aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2023-09-25 14:59:16 -0700
committerCarlos Maiolino <cem@kernel.org>2023-10-05 14:57:20 +0200
commit1bd1a58a723b5995effa6fdca643d16502864eba (patch)
treed6dda96fef26c691d94af5a17b7a10e1039ae777
parent244199cd9ae1d136cec985885e4c336145e74a26 (diff)
downloadxfsprogs-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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/db/init.c b/db/init.c
index eec65d0884..4599cc00d7 100644
--- a/db/init.c
+++ b/db/init.c
@@ -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)) {