summaryrefslogtreecommitdiff
path: root/tests/btrfs/143.out
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2019-12-11 18:40:28 +0800
committerEryu Guan <guaneryu@gmail.com>2019-12-30 02:01:21 +0800
commit1a27bf14ef8b16ac70333920ab00cbac0f05f44c (patch)
treebb56dfa2f826e6f886063af068aa241790e1d38f /tests/btrfs/143.out
parentab76e971702d9fc95e933d62a70b1c4ce5d32449 (diff)
btrfs/14[23]: Use proper help to get both devid and physical offset for corruption.
[BUG] When using btrfs-progs v5.4, btrfs/142 and btrfs/143 will fail: btrfs/142 1s ... - output mismatch (see xfstests/results//btrfs/142.out.bad) --- tests/btrfs/142.out 2018-09-16 21:30:48.505104287 +0100 +++ xfstests/results//btrfs/142.out.bad 2019-12-10 15:35:40.280392626 +0000 @@ -3,37 +3,37 @@ XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) wrote 65536/65536 bytes XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ ... (Run 'diff -u xfstests/tests/btrfs/142.out xfstests/results//btrfs/142.out.bad' to see the entire diff) [CAUSE] Btrfs/14[23] test whether a read on corrupted stripe will re-silver itself. Such test by its nature will need to modify on-disk data, thus need to get the btrfs logical -> physical mapping, which is done by near hard-coded lookup function, which rely on certain stripe:devid sequence. Recent btrfs-progs commit c501c9e3b816 ("btrfs-progs: mkfs: match devid order to the stripe index") changes how we use devices in mkfs.btrfs, this caused a change in chunk layout, and break the hard-coded stripe:devid sequence. [FIX] This patch will do full devid and physical offset lookup, instead of old physical offset only lookup. The only assumption made is, mkfs.btrfs assigns devid sequentially for its devices. Which means, for "mkfs.btrfs $dev1 $dev2 $dev3", we get devid 1 for $dev1, devid 2 for $dev2, and so on. This change will allow btrfs/14[23] to handle even future chunk layout change. (Although I hope this will never happen again). This also addes extra debug output (although less than 10 lines) into $seqres.full, just in case when layout changes and current lookup can't handle it, developer can still pindown the problem easily. Reported-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Qu Wenruo <wqu@suse.com> Tested-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Diffstat (limited to 'tests/btrfs/143.out')
-rw-r--r--tests/btrfs/143.out2
1 files changed, 0 insertions, 2 deletions
diff --git a/tests/btrfs/143.out b/tests/btrfs/143.out
index 66afea4b..a9e82ceb 100644
--- a/tests/btrfs/143.out
+++ b/tests/btrfs/143.out
@@ -1,8 +1,6 @@
QA output created by 143
wrote 131072/131072 bytes
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-wrote 65536/65536 bytes
-XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................