]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: rework the inline directory verifiers libxfs-4.11-sync
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 10 Apr 2017 22:30:00 +0000 (17:30 -0500)
committerEric Sandeen <sandeen@redhat.com>
Mon, 10 Apr 2017 22:30:00 +0000 (17:30 -0500)
commitd15188a1ec14900a9bcbd65d2064c056546bd235
tree0e3f500f8c2af4c5ded5e9a8f265ffdca5c8b110
parentb0a898fec2cfa59feae5bdbcbf472080acfa7e14
xfs: rework the inline directory verifiers

Source kernel commit: 78420281a9d74014af7616958806c3aba056319e

The inline directory verifiers should be called on the inode fork data,
which means after iformat_local on the read side, and prior to
ifork_flush on the write side.  This makes the fork verifier more
consistent with the way buffer verifiers work -- i.e. they will operate
on the memory buffer that the code will be reading and writing directly.

Furthermore, revise the verifier function to return -EFSCORRUPTED so
that we don't flood the logs with corruption messages and assert
notices.  This has been a particular problem with xfs/348, which
triggers the XFS_WANT_CORRUPTED_RETURN assertions, which halts the
kernel when CONFIG_XFS_DEBUG=y.  Disk corruption isn't supposed to do
that, at least not in a verifier.

Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/util.c
libxfs/xfs_dir2_priv.h
libxfs/xfs_dir2_sf.c
libxfs/xfs_inode_fork.c
libxfs/xfs_inode_fork.h