Re: [PATCH 25/34] xfs: remove xfs_reflink_trim_irec_to_next_cow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 24, 2018 at 11:06:59AM -0400, Brian Foster wrote:
> On Thu, May 24, 2018 at 10:59:43AM -0400, Brian Foster wrote:
> > On Wed, May 23, 2018 at 04:43:48PM +0200, Christoph Hellwig wrote:
> > > In the only caller we just did a lookup in the COW extent tree for
> > > the same offset.  Reuse that result and save a lookup, as well as
> > > shortening the ilock hold time.
> > > 
> > > Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> > > ---
> > >  fs/xfs/xfs_aops.c    | 25 +++++++++++++++++--------
> > >  fs/xfs/xfs_reflink.c | 33 ---------------------------------
> > >  fs/xfs/xfs_reflink.h |  2 --
> > >  3 files changed, 17 insertions(+), 43 deletions(-)
> > > 
> > > diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
> > > index a4b4a7037deb..354d26d66c12 100644
> > > --- a/fs/xfs/xfs_aops.c
> > > +++ b/fs/xfs/xfs_aops.c
> > > @@ -383,11 +383,12 @@ xfs_map_blocks(
> > >  	struct xfs_inode	*ip = XFS_I(inode);
> > >  	struct xfs_mount	*mp = ip->i_mount;
> > >  	ssize_t			count = i_blocksize(inode);
> > > -	xfs_fileoff_t		offset_fsb, end_fsb;
> > > +	xfs_fileoff_t		offset_fsb, end_fsb, cow_fsb = 0;
> > 
> > cow_fsb should probably be initialized to NULLFSBLOCK rather than 0.
> > With that, you also shouldn't need cow_valid. Otherwise looks Ok to me.
> > 
> 
> Err.. I guess NULLFILEOFF would be more appropriate here, but same
> idea..

Yes, I'll start using it.
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux