diff options
author | Darrick J. Wong <djwong@kernel.org> | 2023-09-25 14:59:16 -0700 |
---|---|---|
committer | Carlos Maiolino <cem@kernel.org> | 2023-10-05 14:57:20 +0200 |
commit | 1bd1a58a723b5995effa6fdca643d16502864eba (patch) | |
tree | d6dda96fef26c691d94af5a17b7a10e1039ae777 | |
parent | 244199cd9ae1d136cec985885e4c336145e74a26 (diff) | |
download | xfsprogs-dev-1bd1a58a723b5995effa6fdca643d16502864eba.tar.gz |
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>
-rw-r--r-- | db/init.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -96,6 +96,7 @@ init( x.volname = fsdevice; else x.dname = fsdevice; + x.isdirect = LIBXFS_DIRECT; x.bcache_flags = CACHE_MISCOMPARE_PURGE; if (!libxfs_init(&x)) { |