diff options
author | Eric Sandeen <sandeen@redhat.com> | 2009-08-05 21:43:23 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2009-08-15 23:52:00 -0400 |
commit | 1f3d16deaa11681323b8278bec9b48fee2898e4b (patch) | |
tree | 9e562f830850f13dedc90d3809d04882d6b1f97e /misc | |
parent | 5d5e01d7e0549aea6a86b504e8424c891db86b8e (diff) | |
download | e2fsprogs-1f3d16deaa11681323b8278bec9b48fee2898e4b.tar.gz |
filefrag: fix frag count in bmap case
The fragmentation count in the bmap case seems to be
off by one:
/mnt/test/bar: 0 extents found
Addresses-Debian-Bug: #540376
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'misc')
-rw-r--r-- | misc/filefrag.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/misc/filefrag.c b/misc/filefrag.c index a2075e1f..7f274f94 100644 --- a/misc/filefrag.c +++ b/misc/filefrag.c @@ -344,6 +344,8 @@ static void frag_report(const char *filename) rc = get_bmap(fd, i, &block); if (block == 0) continue; + if (!num_extents) + num_extents++; count++; if (last_block && (block != last_block+1) ) { if (verbose) |