Re: [PATCH 2/3] xfs: go straight to real allocations for direct I/O COW writes

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

 



On Wed, Dec 07, 2016 at 02:46:34PM -0500, Brian Foster wrote:
> Only for end_fsb... xfs_bmap_btalloc() calls xfs_bmap_extsize_align()
> with the alignment, which rounds out the start and end offsets.

... and corrupts data in the direct I/O case.

The problem is that the down-alignment in xfs_bmap_extsize_align will
now create a real extent that spans before the extent that we have
to COW in this write_begin call.  But the area before might have been
a hole before the dio write that had just before been filled with
an allocation in the data fork.  And due to the direct I/O end_io
interface that only covers the range of the whole write we don't
know at that point where exactly the COW operation started and will
happily splice back our front pad into the data fork, replacing
the just written data with garbage.  xfs/228 and sometimes generic/199
reproduce this nicely.
--
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