diff options
author | Darrick J. Wong <djwong@kernel.org> | 2023-03-28 17:58:16 -0700 |
---|---|---|
committer | Zorro Lang <zlang@kernel.org> | 2023-04-06 22:05:40 +0800 |
commit | 7d5d3f77154ee927c574808dc0b3c977746dcea7 (patch) | |
tree | 55bfb3dc6dfb1130231553da6dd48216a1048d4d /common | |
parent | 5858995b1f4e14f52230c70bfe9f83df295b04ec (diff) |
xfs/242: fix _filter_bmap for xfs_io bmap that does rt file properly
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>
Diffstat (limited to 'common')
-rw-r--r-- | common/punch | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/common/punch b/common/punch index 3b8be21a..9e730404 100644 --- a/common/punch +++ b/common/punch @@ -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; |