All of lore.kernel.org
 help / color / mirror / Atom feed
From: Naohiro Aota <naohiro.aota@wdc.com>
To: fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org, Naohiro Aota <naohiro.aota@wdc.com>
Subject: [PATCH] fstests, btrfs: check flakey device instead of backend device
Date: Wed, 20 Nov 2019 15:44:06 +0900	[thread overview]
Message-ID: <20191120064406.3467779-1-naohiro.aota@wdc.com> (raw)

btrfs/085 mount and works on $FLAKEY_DEV, but it's inspecting the
underlying $SCRATCH_DEV. Since writing to dm-flakey does not invalidate
page cache of $SCRATCH_DEV, the btrfs command can read a stalled data
from page cache. We should check the flakey device to avoid such cache
inconsistency.

Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
---
 tests/btrfs/085 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/btrfs/085 b/tests/btrfs/085
index 4773ed8041fd..2a31eefd2013 100755
--- a/tests/btrfs/085
+++ b/tests/btrfs/085
@@ -46,7 +46,7 @@ rm -f $seqres.full
 has_orphan_item()
 {
 	INO=$1
-	if $BTRFS_UTIL_PROG inspect-internal dump-tree $SCRATCH_DEV | \
+	if $BTRFS_UTIL_PROG inspect-internal dump-tree $FLAKEY_DEV | \
 		grep -q "key (ORPHAN ORPHAN_ITEM $INO)"; then
 		return 0
 	fi
-- 
2.24.0


             reply	other threads:[~2019-11-20  6:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-20  6:44 Naohiro Aota [this message]
2019-11-20 13:15 ` [PATCH] fstests, btrfs: check flakey device instead of backend device Nikolay Borisov

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=20191120064406.3467779-1-naohiro.aota@wdc.com \
    --to=naohiro.aota@wdc.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@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.