From de2c477815dc6c842db60ef9187c7fddaaa3cd48 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sun, 14 Mar 2010 19:02:57 -0400 Subject: [PATCH] debugfs: Correctly show the allocation status of a block using logdump The offset in the bitmap was not getting correctly calculated when the user specifics a block to track using "logdump -b " Addresses-Debian-Bug: #564084 Signed-off-by: "Theodore Ts'o" --- debugfs/logdump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debugfs/logdump.c b/debugfs/logdump.c index 9a7108a..9364ce4 100644 --- a/debugfs/logdump.c +++ b/debugfs/logdump.c @@ -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: " -- 1.8.3.1