]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfs/242: fix _filter_bmap for xfs_io bmap that does rt file properly
authorDarrick J. Wong <djwong@kernel.org>
Wed, 29 Mar 2023 00:58:16 +0000 (17:58 -0700)
committerZorro Lang <zlang@kernel.org>
Thu, 6 Apr 2023 14:05:40 +0000 (22:05 +0800)
xfsprogs commit b1faed5f787 ("xfs_io: fix bmap command not detecting
realtime files with xattrs") fixed the xfs_io bmap output to display
realtime file columns for realtime files with xattrs.  As a result, the
data and unwritten flags are in column 5 and not column 7.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/punch

index 3b8be21a2a3f84ab2909c269dfea1348850519c5..9e730404e24a2a3a4e4ac47c5b00b2fa155fe4b0 100644 (file)
@@ -188,6 +188,7 @@ _filter_hole_fiemap()
        _coalesce_extents
 }
 
+# Column 7 for datadev files and column 5 for rtdev files
 #     10000 Unwritten preallocated extent
 #     01000 Doesn't begin on stripe unit
 #     00100 Doesn't end   on stripe unit
@@ -200,6 +201,13 @@ _filter_bmap()
                        print $1, $2, $3;
                        next;
                }
+               $5 ~ /1[01][01][01][01]/ {
+                       print $1, $2, "unwritten";
+                       next;
+               }
+               $5 ~ /0[01][01][01][01]/ {
+                       print $1, $2, "data"
+               }
                $7 ~ /1[01][01][01][01]/ {
                        print $1, $2, "unwritten";
                        next;