diff options
author | Li Dongyang <dongyangli@ddn.com> | 2019-11-20 04:35:24 +0000 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2020-01-01 13:41:35 -0500 |
commit | d23f88ebaafbb5141822f5998a4417abdb8ffb36 (patch) | |
tree | 60a51d8a80ee39aa9376312169ca533cb5d839dd | |
parent | 6607eaad265cef529d81c31fef936c56e3157d85 (diff) | |
download | e2fsprogs-d23f88ebaafbb5141822f5998a4417abdb8ffb36.tar.gz |
mke2fs: fix setting bad blocks in the block bitmap
We mark the bad blocks as used on fs->block_map before allocating
group tables. Don't translate the block number to cluster number when
doing this, the fs->block_map is still a block-granularity allocation
map, it will be coverted later by ext2fs_convert_subcluster_bitmap().
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r-- | misc/mke2fs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/mke2fs.c b/misc/mke2fs.c index d7cf257e9..30e353d33 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -344,7 +344,7 @@ _("Warning: the backup superblock/group descriptors at block %u contain\n" exit(1); } while (ext2fs_badblocks_list_iterate(bb_iter, &blk)) - ext2fs_mark_block_bitmap2(fs->block_map, EXT2FS_B2C(fs, blk)); + ext2fs_mark_block_bitmap2(fs->block_map, blk); ext2fs_badblocks_list_iterate_end(bb_iter); } |