From: Li Dongyang <dongyangli@ddn.com>
To: "linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>
Cc: "adilger@dilger.ca" <adilger@dilger.ca>
Subject: [PATCH v3 2/5] mke2fs: fix setting bad blocks in the block bitmap
Date: Wed, 20 Nov 2019 04:35:24 +0000 [thread overview]
Message-ID: <20191120043448.249988-2-dongyangli@ddn.com> (raw)
In-Reply-To: <20191120043448.249988-1-dongyangli@ddn.com>
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>
---
misc/mke2fs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index ffea8233..be38d2c4 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);
}
--
2.24.0
next prev parent reply other threads:[~2019-11-20 4:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-20 4:35 [PATCH v3 1/5] libext2fs: optimize ext2fs_convert_subcluster_bitmap() Li Dongyang
2019-11-20 4:35 ` Li Dongyang [this message]
2019-12-31 3:47 ` [PATCH v3 2/5] mke2fs: fix setting bad blocks in the block bitmap Theodore Y. Ts'o
2019-11-20 4:35 ` [PATCH v3 3/5] ext2fs: rename "s_overhead_blocks" to "s_overhead_clusters" Li Dongyang
2020-01-27 3:05 ` Theodore Y. Ts'o
2019-11-20 4:35 ` [PATCH v3 4/5] mke2fs: set overhead in super block Li Dongyang
2020-01-27 4:15 ` Theodore Y. Ts'o
2019-11-20 4:35 ` [PATCH v3 5/5] ext4: record " Li Dongyang
2020-01-27 2:56 ` [PATCH v3 1/5] libext2fs: optimize ext2fs_convert_subcluster_bitmap() Theodore Y. Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191120043448.249988-2-dongyangli@ddn.com \
--to=dongyangli@ddn.com \
--cc=adilger@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.