From 1bd1a58a723b5995effa6fdca643d16502864eba Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Mon, 25 Sep 2023 14:59:16 -0700 Subject: [PATCH] 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 Reviewed-by: Carlos Maiolino Signed-off-by: Carlos Maiolino --- db/init.c | 1 + 1 file changed, 1 insertion(+) diff --git a/db/init.c b/db/init.c index eec65d088..4599cc00d 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)) { -- 2.47.3