From: Darrick J. Wong Date: Mon, 25 Sep 2023 21:59:16 +0000 (-0700) Subject: xfs_db: use directio for device access X-Git-Tag: v6.5.0~8 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=1bd1a58a723b5995effa6fdca643d16502864eba;p=xfsprogs-dev.git 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 --- 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)) {