]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs_db: use directio for device access
authorDarrick J. Wong <djwong@kernel.org>
Mon, 25 Sep 2023 21:59:16 +0000 (14:59 -0700)
committerCarlos Maiolino <cem@kernel.org>
Thu, 5 Oct 2023 12:57:20 +0000 (14:57 +0200)
commit1bd1a58a723b5995effa6fdca643d16502864eba
treed6dda96fef26c691d94af5a17b7a10e1039ae777
parent244199cd9ae1d136cec985885e4c336145e74a26
xfs_db: use directio for device access

XFS and tools (mkfs, copy, repair) don't generally rely on the block
device page cache, preferring instead to use directio.  For whatever
reason, the debugger was never made to do this, but let's do that now.

This should eliminate the weird fstests failures resulting from
udev/blkid pinning a cache page while the unmounting filesystem writes
to the superblock such that xfs_db finds the stale pagecache instead of
the post-unmount superblock.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
db/init.c