@@ -119,7 +119,21 @@ _filter_fiemap_flags()
next;
}
$5 ~ /0x[[:xdigit:]]+/ {
- print $1, $2, $5;
+ flags = strtonum($5);
+ flag_str = "none";
+ set = 0;
+
+ if (and(flags, 0x2000)) {
+ flag_str = "shared";
+ set = 1;
+ }
+ if (and(flags, 0x1)) {
+ if (set) {
+ flag_str = flag_str"|";
+ }
+ flag_str = flag_str"last";
+ }
+ print $1, $2, flag_str
}' |
_coalesce_extents
}
@@ -1,5 +1,5 @@
QA output created by 352
wrote 131072/131072 bytes at offset 0
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-0: [0..2097151]: 0x2000
-1: [2097152..2097407]: 0x2001
+0: [0..2097151]: shared
+1: [2097152..2097407]: shared|last
@@ -5,11 +5,11 @@ linked 65536/65536 bytes at offset 0
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
before sync:
SCRATCH_MNT/file1
-0: [0..127]: 0x2001
+0: [0..127]: shared|last
SCRATCH_MNT/file2
-0: [0..127]: 0x2001
+0: [0..127]: shared|last
after sync:
SCRATCH_MNT/file1
-0: [0..127]: 0x2001
+0: [0..127]: shared|last
SCRATCH_MNT/file2
-0: [0..127]: 0x2001
+0: [0..127]: shared|last
My nightly btrfs tests are failing on my configs with -o compress because the extents have FIEMAP_EXTENT_ENCODED set, which throws the golden output off. Fix this by changing the filter helper to spit out symbolic names for SHARED and LAST (these tests only care about SHARED). Then change the golden output to match the new output of the filter. With this patch my -o compress configs now pass these tests. Signed-off-by: Josef Bacik <josef@toxicpanda.com> --- common/punch | 16 +++++++++++++++- tests/generic/352.out | 4 ++-- tests/generic/353.out | 8 ++++---- 3 files changed, 21 insertions(+), 7 deletions(-)