All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: djwong@kernel.org, cem@kernel.org
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH 2/2] xfs_db: use directio for device access
Date: Mon, 25 Sep 2023 14:59:16 -0700	[thread overview]
Message-ID: <169567915609.2320255.8945830759168479067.stgit@frogsfrogsfrogs> (raw)
In-Reply-To: <169567914468.2320255.9161174588218371786.stgit@frogsfrogsfrogs>

From: Darrick J. Wong <djwong@kernel.org>

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>
---
 db/init.c |    1 +
 1 file changed, 1 insertion(+)


diff --git a/db/init.c b/db/init.c
index eec65d0884d..4599cc00d71 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)) {


  parent reply	other threads:[~2023-09-25 21:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <KT7JxvGZnq9-QNN8kBpbKekDJ2BKLQOGCjpSETPSGhPryNhXo_L71VZTCaXaI2AY3cjBINdJO97ZbUCOOYZSeg==@protonmail.internalid>
2023-09-25 21:59 ` [PATCHSET 0/2] xfs_db: use directio for filesystem access Darrick J. Wong
2023-09-25 21:59   ` [PATCH 1/2] libxfs: make platform_set_blocksize optional with directio Darrick J. Wong
2023-09-25 21:59   ` Darrick J. Wong [this message]
2024-01-17 18:30     ` [PATCH 2/2] xfs_db: use directio for device access Christoph Hellwig
2024-01-18  1:32       ` Darrick J. Wong
2024-01-18  4:21         ` Christoph Hellwig
2024-01-19  0:52           ` Darrick J. Wong
2023-10-03 11:47   ` [PATCHSET 0/2] xfs_db: use directio for filesystem access Carlos Maiolino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=169567915609.2320255.8945830759168479067.stgit@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=cem@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.