]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
Fix a bug in filefrag so that it doesn't when the first block found is an
authorTheodore Ts'o <tytso@mit.edu>
Fri, 6 May 2005 02:55:20 +0000 (22:55 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 6 May 2005 02:55:20 +0000 (22:55 -0400)
indirect block, it doesn't falsely count an extra discontunity.  (Addresses
Debian Bug #307607).

misc/ChangeLog
misc/filefrag.c

index 6f8d9fce9fdb284eb62706092063f4e61b03951a..afb3b74c14d67e1d8e44fa81d13351ddf5ba9bea 100644 (file)
@@ -1,3 +1,9 @@
+2005-05-05  Theodore Ts'o  <tytso@mit.edu>
+
+       * filefrag.c (frag_report): Fix so that when the first block to be
+               found is an indirect block, we don't falsely count an
+               extra discontinuity.  (Addresses Debian Bug: #307607)
+
 2005-04-16  Theodore Ts'o  <tytso@mit.edu>
 
        * badblocks.8.in, dumpe2fs.8.in, fsck.8.in, tune2fs.8.in: Fix
index ea74028bd9c9bfc16ca5ac8eefa7c33b50a1ab86..5364125c1bc6766ba8a96179cef97a5395ef73f4 100644 (file)
@@ -127,7 +127,7 @@ static void frag_report(const char *filename)
                       get_bmap(fd, 0), get_bmap(fd, numblocks - 1));
        }
        for (i=0; i < numblocks; i++) {
-               if (is_ext2) {
+               if (is_ext2 && last_block) {
                        if (((i-EXT2_DIRECT) % bpib) == 0)
                                last_block++;
                        if (((i-EXT2_DIRECT-bpib) % (bpib*bpib)) == 0)