f2fs: fix block address for __check_sit_bitmap
Subsystems (2)
PATCH 1/1 f2fs: fix block address for __check_sit_bitmap
From: Qiuyang Sun <[email protected]>
Should use lstart (logical start address) instead of start (in dev) here. This fixes a bug in multi-device scenarios.
Signed-off-by Qiuyang Sun <[email protected]>
--- fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/segment.c +1 -1
@@ -1150,7 +1150,7 @@ static int __submit_discard_cmd(struct f2fs_sb_info *sbi,list_move_tail (&dc->list, wait_list);/* sanity check on discard range */ -__check_sit_bitmap (sbi, start, start + len); +__check_sit_bitmap (sbi, lstart, lstart + len); bio->bi_private = dc; bio->bi_end_io = f2fs_submit_discard_endio;
Signature · 1 line
1.8.3.1
Quoted 4 lines · sunqiuyang
From: Qiuyang Sun <[email protected]>
Should use lstart (logical start address) instead of start (in dev) here. This fixes a bug in multi-device scenarios.
Good catch!
Quoted 2 lines
Signed-off-by Qiuyang Sun <[email protected]>
Reviewed-by Chao Yu <[email protected]>
Thanks,