xfs
[Top] [All Lists]

Re: [PATCH 5/5] implement IHOLD/IRELE directly

To: Christoph Hellwig <hch@xxxxxx>
Subject: Re: [PATCH 5/5] implement IHOLD/IRELE directly
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 24 Jul 2008 08:55:48 +1000
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20080723194950.GF6188@xxxxxx>
Mail-followup-to: Christoph Hellwig <hch@xxxxxx>, xfs@xxxxxxxxxxx
References: <20080723194950.GF6188@xxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
On Wed, Jul 23, 2008 at 09:49:50PM +0200, Christoph Hellwig wrote:
> Now that all direct calls to VN_HOLD/VN_RELE are gone we can implement
> IHOLD/IRELE directly.
> 
> For the IHOLD case also replace igrab with a direct increment of i_count
> because we are guaranteed to already have a live and referenced inode
> by the VFS.  Also remove the vn_hold statistic because it's been rather
> meaningless for some time with most references done by other callers.

Seeing as you are changing from an igrab() to a straight
atomic_inc(), can you put an:

ASSERT(atomic_read(&VFS_I(ip)->i_count) > 0)

into the IHOLD macro so we catch screwups in reference counting as
quickly as possible?

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx


<Prev in Thread] Current Thread [Next in Thread>