filefrag.c (frag_report): Fix filefrag so that it works

correctly with sparse files; unallocated blocks should not
be treated as a discontinuity.
bitmap-optimize
Theodore Ts'o 2005-01-20 17:37:01 -05:00
parent 290806abc3
commit 0aa0e0c7d6
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2005-01-20 <tytso@snap.thunk.org>
* filefrag.c (frag_report): Fix filefrag so that it works
correctly with sparse files; unallocated blocks should not
be treated as a discontinuity.
2005-01-19 Theodore Ts'o <tytso@mit.edu>
* mke2fs.c (show_stats, set_os): Interpret OS Creator values for

View File

@ -123,7 +123,7 @@ static void frag_report(const char *filename)
last_block++;
}
block = get_bmap(fd, i);
if (i && (block != last_block +1) ) {
if (i && block && (block != last_block +1) ) {
if (verbose)
printf("Discontinuity: Block %ld is at %ld (was %ld)\n",
i, block, last_block);