Linux XFS filesystem development
 help / color / mirror / Atom feed
* [PATCH] xfs_bmap: don't reject -e
@ 2018-06-21 18:49 Darrick J. Wong
  2018-06-21 19:32 ` Eric Sandeen
  0 siblings, 1 reply; 3+ messages in thread
From: Darrick J. Wong @ 2018-06-21 18:49 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs

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.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfs_bmap: don't reject -e
  2018-06-21 18:49 [PATCH] xfs_bmap: don't reject -e Darrick J. Wong
@ 2018-06-21 19:32 ` Eric Sandeen
  2018-06-21 19:47   ` Darrick J. Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Sandeen @ 2018-06-21 19:32 UTC (permalink / raw)
  To: Darrick J. Wong, Eric Sandeen; +Cc: xfs

On 6/21/18 1:49 PM, Darrick J. Wong wrote:
> 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.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

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")


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfs_bmap: don't reject -e
  2018-06-21 19:32 ` Eric Sandeen
@ 2018-06-21 19:47   ` Darrick J. Wong
  0 siblings, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2018-06-21 19:47 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: Eric Sandeen, xfs

On Thu, Jun 21, 2018 at 02:32:44PM -0500, Eric Sandeen wrote:
> On 6/21/18 1:49 PM, Darrick J. Wong wrote:
> > 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.
> > 
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> 
> 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.

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

Ok.

--D

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-06-21 19:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-21 18:49 [PATCH] xfs_bmap: don't reject -e Darrick J. Wong
2018-06-21 19:32 ` Eric Sandeen
2018-06-21 19:47   ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox