All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fstests, btrfs: check flakey device instead of backend device
@ 2019-11-20  6:44 Naohiro Aota
  2019-11-20 13:15 ` Nikolay Borisov
  0 siblings, 1 reply; 2+ messages in thread
From: Naohiro Aota @ 2019-11-20  6:44 UTC (permalink / raw)
  To: fstests; +Cc: linux-btrfs, Naohiro Aota

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fstests, btrfs: check flakey device instead of backend device
  2019-11-20  6:44 [PATCH] fstests, btrfs: check flakey device instead of backend device Naohiro Aota
@ 2019-11-20 13:15 ` Nikolay Borisov
  0 siblings, 0 replies; 2+ messages in thread
From: Nikolay Borisov @ 2019-11-20 13:15 UTC (permalink / raw)
  To: Naohiro Aota, fstests; +Cc: linux-btrfs



On 20.11.19 г. 8:44 ч., Naohiro Aota wrote:
> 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>

Reviewed-by: Nikolay Borisov <nborisov@suse.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-20 13:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-20  6:44 [PATCH] fstests, btrfs: check flakey device instead of backend device Naohiro Aota
2019-11-20 13:15 ` Nikolay Borisov

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.