mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-11-23 10:10:00 +00:00
resize.f2fs: fix a resize fail for sector size mismatch
This patch fix a resize faill for sector size mismatch. The initial fs comes from an image file, with sector size 512KB, and the block device sector size is equal to block size. Signed-off-by: Yunlei He <heyunlei@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
52a3a273d1
commit
78ad88d1d2
@ -537,8 +537,9 @@ static int do_resize(struct f2fs_sb_info *sbi)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (c.target_sectors <=
|
||||
(get_sb(block_count) << get_sb(log_sectors_per_block))) {
|
||||
/* may different sector size */
|
||||
if ((c.target_sectors * c.sector_size >>
|
||||
get_sb(log_blocksize)) <= get_sb(block_count)) {
|
||||
ASSERT_MSG("Nothing to resize, now only support resize to expand\n");
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user