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>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
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