public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: xfs <linux-xfs@vger.kernel.org>
Subject: [PATCH v2] xfs_bmap: don't reject -e
Date: Thu, 21 Jun 2018 12:48:25 -0700	[thread overview]
Message-ID: <20180621194825.GG4838@magnolia> (raw)

From: Darrick J. Wong <darrick.wong@oracle.com>

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.

Fixes: 7536ce44f6 ("xfs_io: bmap should support querying CoW fork, shared blocks")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
v2: add Fixes:
---
 io/xfs_bmap.sh      |    5 +++--
 man/man8/xfs_bmap.8 |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/io/xfs_bmap.sh b/io/xfs_bmap.sh
index b4e7992b..753d57cb 100755
--- a/io/xfs_bmap.sh
+++ b/io/xfs_bmap.sh
@@ -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";;
diff --git a/man/man8/xfs_bmap.8 b/man/man8/xfs_bmap.8
index c7255192..ae923481 100644
--- a/man/man8/xfs_bmap.8
+++ b/man/man8/xfs_bmap.8
@@ -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

             reply	other threads:[~2018-06-21 19:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-21 19:48 Darrick J. Wong [this message]
2018-06-21 20:11 ` [PATCH v2] xfs_bmap: don't reject -e Eric Sandeen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180621194825.GG4838@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox