All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: ext4 development <linux-ext4@vger.kernel.org>
Subject: [PATCH] filefrag: don't print extent header on bmap fallback
Date: Wed, 05 Aug 2009 22:30:48 -0500	[thread overview]
Message-ID: <4A7A4E68.3050202@redhat.com> (raw)

The extent list header gets printed before we fall back to bmap:

# filefrag -v /mnt/test/bar
Filesystem type is: 58465342
File size of /mnt/test/bar is 12288 (3 blocks, blocksize 4096)
 ext logical physical expected length flags <---- HERE
Discontinuity: Block 2 is at 17 (was 16)
/mnt/test/bar: 2 extents found

so delay printing it until we know fiemap is working.

(though ideally it'd be nice to have the same verbose output
regardless of the interface we used, I think).

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

diff --git a/misc/filefrag.c b/misc/filefrag.c
index 128a391..de0444c 100644
--- a/misc/filefrag.c
+++ b/misc/filefrag.c
@@ -173,6 +173,7 @@ static int filefrag_fiemap(int fd, int blk_shift, int *num_extents)
 	unsigned long flags = 0;
 	unsigned int i;
 	static int fiemap_incompat_printed;
+	int fiemap_header_printed = 0;
 	int tot_extents = 1, n = 0;
 	int last = 0;
 	int rc;
@@ -190,11 +191,6 @@ static int filefrag_fiemap(int fd, int blk_shift, int *num_extents)
 	if (xattr_map)
 		flags |= FIEMAP_FLAG_XATTR;
 
-	if (verbose)
-		printf(" ext %*s %*s %*s length flags\n", logical_width,
-		       "logical", physical_width, "physical",
-		       physical_width, "expected");

             reply	other threads:[~2009-08-06  3:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-06  3:30 Eric Sandeen [this message]
2009-08-16  3:50 ` [PATCH] filefrag: don't print extent header on bmap fallback Theodore Tso

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=4A7A4E68.3050202@redhat.com \
    --to=sandeen@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.