Whamcloud - gitweb
debugfs: Correctly show the allocation status of a block using logdump
authorTheodore Ts'o <tytso@mit.edu>
Sun, 14 Mar 2010 23:02:57 +0000 (19:02 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 15 Mar 2010 04:14:12 +0000 (00:14 -0400)
The offset in the bitmap was not getting correctly calculated when the
user specifics a block to track using "logdump -b <block-num>"

Addresses-Debian-Bug: #564084

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
debugfs/logdump.c

index 9a7108a..9364ce4 100644 (file)
@@ -619,7 +619,7 @@ static void dump_metadata_block(FILE *out_file, struct journal_source *source,
                int offset;
 
                super = current_fs->super;
-               offset = ((fs_blocknr - super->s_first_data_block) %
+               offset = ((block_to_dump - super->s_first_data_block) %
                          super->s_blocks_per_group);
 
                fprintf(out_file, "    (block bitmap for block %u: "