diff options
author | Eric Sandeen <sandeen@redhat.com> | 2015-12-21 18:40:18 +1100 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2015-12-21 18:40:18 +1100 |
commit | b7fd3f05d6a7a320d13ff507eda2e5b183cae180 (patch) | |
tree | 78d59d5bbccb267d3ee084846a8db1105023e897 /common/punch | |
parent | 44f59bd904dc87d9e9ac622555b414c3c99566ef (diff) |
common/punch: handle bmap output for unaligned extents
xfs/242 fails if the mapping flags show unaligned extents;
fix up the regexp to allow this, we really only care about
the unwritten flag.
Signed-off-by: eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'common/punch')
-rw-r--r-- | common/punch | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/common/punch b/common/punch index d9b8426f..43f04c2d 100644 --- a/common/punch +++ b/common/punch @@ -234,6 +234,11 @@ _filter_hole_fiemap() _coalesce_extents } +# 10000 Unwritten preallocated extent +# 01000 Doesn't begin on stripe unit +# 00100 Doesn't end on stripe unit +# 00010 Doesn't begin on stripe width +# 00001 Doesn't end on stripe width _filter_bmap() { awk ' @@ -241,11 +246,11 @@ _filter_bmap() print $1, $2, $3; next; } - $7 ~ /10000/ { + $7 ~ /1[01][01][01][01]/ { print $1, $2, "unwritten"; next; } - $7 ~ /00000/ { + $7 ~ /0[01][01][01][01]/ { print $1, $2, "data" }' | _coalesce_extents |