linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] f2fs: fix block address for __check_sit_bitmap
@ 2018-12-18  9:32 sunqiuyang
  2018-12-18 10:36 ` Chao Yu
  0 siblings, 1 reply; 2+ messages in thread
From: sunqiuyang @ 2018-12-18  9:32 UTC (permalink / raw)
  To: linux-kernel, linux-fsdevel, linux-f2fs-devel
  Cc: fangwei1, yuchangchun1, sunqiuyang

From: Qiuyang Sun <sunqiuyang@huawei.com>

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 <sunqiuyang@huawei.com>
---
 fs/f2fs/segment.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 204d31e..1a11e7e 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -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;
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] f2fs: fix block address for __check_sit_bitmap
  2018-12-18  9:32 [PATCH] f2fs: fix block address for __check_sit_bitmap sunqiuyang
@ 2018-12-18 10:36 ` Chao Yu
  0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2018-12-18 10:36 UTC (permalink / raw)
  To: sunqiuyang, linux-kernel, linux-fsdevel, linux-f2fs-devel
  Cc: fangwei1, yuchangchun1

On 2018/12/18 17:32, sunqiuyang wrote:
> From: Qiuyang Sun <sunqiuyang@huawei.com>
> 
> Should use lstart (logical start address) instead of start (in dev) here.
> This fixes a bug in multi-device scenarios.

Good catch!

> 
> Signed-off-by: Qiuyang Sun <sunqiuyang@huawei.com>

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-18 10:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-18  9:32 [PATCH] f2fs: fix block address for __check_sit_bitmap sunqiuyang
2018-12-18 10:36 ` Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).