Re: [PATCH 10/11] xfs: make COW fork unwritten extent conversions more robust

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

 



> >  	xfs_fileoff_t		end_fsb = XFS_B_TO_FSB(mp, offset + count);
> >  	xfs_filblks_t		count_fsb = end_fsb - offset_fsb;
> > -	struct xfs_bmbt_irec	imap;
> > -	int			nimaps = 1, error = 0;
> > +	int			error;
> >  
> >  	ASSERT(count != 0);
> >  
> >  	xfs_ilock(ip, XFS_ILOCK_EXCL);
> > -	error = xfs_bmapi_write(NULL, ip, offset_fsb, count_fsb,
> > -			XFS_BMAPI_COWFORK | XFS_BMAPI_CONVERT |
> > -			XFS_BMAPI_CONVERT_ONLY, 0, &imap, &nimaps);
> > +	error = xfs_reflink_convert_cow_locked(ip, offset_fsb, count_fsb);
> 
> At this point you might as well convert the one remaining caller of
> xfs_reflink_convert_cow to take and drop the ILOCK around the
> reflink_convert_cow call...

I looked at it - the ilock is not the issue, but moving the bytes
to fsb conversion into the only caller makes it look worse than
keeping a helper for that one helper.



[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