[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZBzlJ36kO5KvxODB@google.com>
Date: Thu, 23 Mar 2023 16:47:51 -0700
From: Jaegeuk Kim <jaegeuk@...nel.org>
To: Yohan Joung <jyh429@...il.com>
Cc: lkp@...el.com, chao@...nel.org,
linux-f2fs-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org, oe-kbuild-all@...ts.linux.dev,
Yohan Joung <yohan.joung@...com>
Subject: Re: [PATCH] f2fs: fix align check for npo2
On 03/23, Yohan Joung wrote:
> Fix alignment check to be correct in npo2 as well
>
> Signed-off-by: Yohan Joung <yohan.joung@...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 055e70e77aa2..46458085a8d0 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -1858,7 +1858,7 @@ static int __f2fs_issue_discard_zone(struct f2fs_sb_info *sbi,
> sector = SECTOR_FROM_BLOCK(blkstart);
> nr_sects = SECTOR_FROM_BLOCK(blklen);
>
> - if (sector & (bdev_zone_sectors(bdev) - 1) ||
> + if (sector % bdev_zone_sectors(bdev) ||
Need to use div_u64_rem()?
> nr_sects != bdev_zone_sectors(bdev)) {
> f2fs_err(sbi, "(%d) %s: Unaligned zone reset attempted (block %x + %x)",
> devi, sbi->s_ndevs ? FDEV(devi).path : "",
>
> base-commit: d15180a8d1d72c7bddcb700d2c9ffdab7d2b9481
> --
> 2.25.1
Powered by blists - more mailing lists