All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] filefrag: don't print extent header on bmap fallback
@ 2009-08-06  3:30 Eric Sandeen
  2009-08-16  3:50 ` Theodore Tso
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2009-08-06  3:30 UTC (permalink / raw)
  To: ext4 development

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

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

* Re: [PATCH] filefrag: don't print extent header on bmap fallback
  2009-08-06  3:30 [PATCH] filefrag: don't print extent header on bmap fallback Eric Sandeen
@ 2009-08-16  3:50 ` Theodore Tso
  0 siblings, 0 replies; 2+ messages in thread
From: Theodore Tso @ 2009-08-16  3:50 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: ext4 development

On Wed, Aug 05, 2009 at 10:30:48PM -0500, Eric Sandeen wrote:
> 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).

Thanks, applied.

					- Ted

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

end of thread, other threads:[~2009-08-16  3:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-06  3:30 [PATCH] filefrag: don't print extent header on bmap fallback Eric Sandeen
2009-08-16  3:50 ` Theodore Tso

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.