]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
xfs/42[01]: don't disturb unwritten status with md5sum
authorChristoph Hellwig <hch@lst.de>
Mon, 18 Feb 2019 09:19:51 +0000 (10:19 +0100)
committerEryu Guan <guaneryu@gmail.com>
Sun, 10 Mar 2019 15:22:25 +0000 (23:22 +0800)
commit6be9a7861854e225c2d257743db7332033604491
tree5239d57b83a514101931d26fdda638242412f6fc
parentead024c292feec31b3c768cbb4e7c12a1379897a
xfs/42[01]: don't disturb unwritten status with md5sum

The way we decided if an unwritten extent is considered a hole or
data is by checking if the page and/or blocks are marked uptodate,
that is contain valid data in the page cache.

xfs/420 and xfs/421 try to exercise SEEK_HOLE / SEEK_DATA in the
presence of cowextsize preallocations over holes in the data fork.
The current XFS code never actually uses those for buffer writes,
but a pending patch changes that.  For SEEK_HOLE / SEEK_DATA to work
properly in that case we also need to look at the COW fork in their
implementations and thus have to rely on the unwritten extent page
cache probing.  But the tests for it ensure we do have valid data in
the pagecache by calling md5sum on the test files, and thus reading
their contents (including the zero-filled holes) in, and thus making
them all valid data.

Fix that by dropping the page cache content after the md5sum calls.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/xfs/420
tests/xfs/421