Skip to contentSkip to conversation

xfs_bmap: don't reject -e

PATCH Superseded Darrick J. Wong 2 participants 3 messages Jun 21, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs_bmap: don't reject -e

From: Darrick J. Wong <[email protected]>

The xfs_io bmap command has an -e switch that prints delalloc extents without fsync'ing the file first. The xfs_bmap manpage says it'll pass -e through, but it doesn't. Fix the script and fix the weird manpage discrepancy where it doesn't list -e in the available options but discusses it anyway.

---
 io/xfs_bmap.sh      |    5 +++--
 man/man8/xfs_bmap.8 |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
io/xfs_bmap.sh +3 -2
index b4e7992b..753d57cb 100755
@@ -5,14 +5,15 @@
 
 OPTS=""
 VERSION=false
-USAGE="Usage: xfs_bmap [-adlpvV] [-n nx] file..."
+USAGE="Usage: xfs_bmap [-adelpvV] [-n nx] file..."
 DIRNAME=`dirname $0`
 
-while getopts "adln:pvV" c
+while getopts "adeln:pvV" c
 do
 	case $c in
 	a)	OPTS=$OPTS" -a";;
 	d)	OPTS=$OPTS" -d";;
+	e)	OPTS=$OPTS" -e";;
 	l)	OPTS=$OPTS" -l";;
 	n)	OPTS=$OPTS" -n "$OPTARG;;
 	p)	OPTS=$OPTS" -p";;
man/man8/xfs_bmap.8 +1 -1
index c7255192..ae923481 100644
@@ -4,7 +4,7 @@ xfs_bmap \- print block mapping for an XFS file
 .SH SYNOPSIS
 .B xfs_bmap
 [
-.B \-adlpv
+.B \-adelpv
 ] [
 .B \-n
 .I num_extents
#1 lore raw
Quoted 9 lines · Darrick J. Wong

From: Darrick J. Wong <[email protected]>

The xfs_io bmap command has an -e switch that prints delalloc extents without fsync'ing the file first. The xfs_bmap manpage says it'll pass -e through, but it doesn't. Fix the script and fix the weird manpage discrepancy where it doesn't list -e in the available options but discusses it anyway.

need to fix it all up for "-c" as well, right?

and I think:

Fixes 7536ce44f6 ("xfs_io: bmap should support querying CoW fork, shared blocks")
#2 lore raw
Quoted 9 lines · Eric Sandeen
Quoted 8 lines · Darrick J. Wong

From: Darrick J. Wong <[email protected]>

The xfs_io bmap command has an -e switch that prints delalloc extents without fsync'ing the file first. The xfs_bmap manpage says it'll pass -e through, but it doesn't. Fix the script and fix the weird manpage discrepancy where it doesn't list -e in the available options but discusses it anyway.

Quoted 3 lines
Quoted 1 line

need to fix it all up for "-c" as well, right?

The cow fork bmap only works if CONFIG_XFS_DEBUG=y (per review comment when reflink was being developed) so I never bothered wiring it up from xfs_bmap.sh, only xfs_io.

Quoted 3 lines

and I think:

Fixes 7536ce44f6 ("xfs_io: bmap should support querying CoW fork, shared blocks")

Ok.

--D

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html