xfs
[Top] [All Lists]

Re: [PATCH 11/17] xfs: simplify inode to transaction joining

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 11/17] xfs: simplify inode to transaction joining
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 2 Jun 2010 15:57:45 +1000
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20100531160901.401855518@xxxxxxxxxxxxxxxxxxxxxx>
References: <20100531160727.842750532@xxxxxxxxxxxxxxxxxxxxxx> <20100531160901.401855518@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Mon, May 31, 2010 at 12:07:38PM -0400, Christoph Hellwig wrote:
> Currently we need to either call IHOLD or xfs_trans_ihold on an inode when
> joining it to a transaction via xfs_trans_ijoin.
> 
> This patches instead makes xfs_trans_ijoin usable on it's own by doing
> an implicity xfs_trans_ihold, which also allows us to drop the third
> argument.  For the case where we want to hold a reference on the inode
> a xfs_trans_ijoin_ref wrapper is added which does the IHOLD and marks
> the inode for needing an xfs_iput.  In addition to the cleaner interface
> to the caller this also simplifies the implementation.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Can't say I'm fond of the xfs_trans_iget() setting of the lock
flags, but that's a small price to pay forthe rest of the cleanup.
So it looks good to me.

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>

-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [PATCH 11/17] xfs: simplify inode to transaction joining, Dave Chinner <=