Re: [PATCH 4/6] xfs: zeroing space needs to punch delalloc blocks

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

 



On Thu, Apr 10, 2014 at 03:40:01AM -0700, Christoph Hellwig wrote:
> On Thu, Apr 10, 2014 at 03:00:51PM +1000, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@xxxxxxxxxx>
> > 
> > When we are zeroing space andit is covered by a delalloc range, we
> > need to punch the delalloc range out before we truncate the page
> > cache. Failing to do so leaves and inconsistency between the page
> > cache and the extent tree, which we later trip over when doing
> > direct IO over the same range.
> 
> Looks good.
> 
> Which test found this?

The fsstress tests - any of them will do. It showed after I merged
Lukas' FALLOC_FL_ZERO_RANGE support patches for fsstress and fsx
into xfstests, but it wasn't reliably triggering until I fixed the
__xfs_get_blocks DIO bug that Al found...

> > @@ -1432,9 +1434,18 @@ xfs_zero_file_space(
> >  	ASSERT(end_boundary <= offset + len);
> >  
> >  	if (start_boundary < end_boundary - 1) {
> > -		/* punch out the page cache over the conversion range */
> > +		/*
> > +		 * punch out delayed allocation blocks and the page cache over
> > +		 * the conversion range
> > +		 */
> > +		xfs_ilock(ip, XFS_ILOCK_EXCL);
> > +		error = xfs_bmap_punch_delalloc_range(ip,
> > +				XFS_B_TO_FSB(mp, start_boundary),
> 
> Shouldn't this be XFS_B_TO_FSBT?

XFS_B_TO_FSB gives the same result given that we've already rounded
start_boundary to block granularity....

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux