* Re: [PATCH] f2fs: fix align check for npo2
[not found] <20230322131408.1192-1-jyh429@gmail.com>
@ 2023-03-23 2:37 ` kernel test robot
2023-03-23 7:23 ` Yohan Joung
0 siblings, 1 reply; 6+ messages in thread
From: kernel test robot @ 2023-03-23 2:37 UTC (permalink / raw)
To: Yohan Joung, jaegeuk, chao
Cc: oe-kbuild-all, linux-f2fs-devel, linux-kernel, Yohan Joung
Hi Yohan,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on jaegeuk-f2fs/dev-test]
[also build test ERROR on jaegeuk-f2fs/dev]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Yohan-Joung/f2fs-fix-align-check-for-npo2/20230322-211529
base: https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev-test
patch link: https://lore.kernel.org/r/20230322131408.1192-1-jyh429%40gmail.com
patch subject: [PATCH] f2fs: fix align check for npo2
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20230323/202303231039.GKLRE8O5-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/3531dd5850533df89bd45af9fd59ed4693d6d5aa
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Yohan-Joung/f2fs-fix-align-check-for-npo2/20230322-211529
git checkout 3531dd5850533df89bd45af9fd59ed4693d6d5aa
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303231039.GKLRE8O5-lkp@intel.com/
All errors (new ones prefixed by >>, old ones prefixed by <<):
>> ERROR: modpost: "__umoddi3" [fs/f2fs/f2fs.ko] undefined!
>> ERROR: modpost: "__moddi3" [fs/f2fs/f2fs.ko] undefined!
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] f2fs: fix align check for npo2
2023-03-23 2:37 ` [PATCH] f2fs: fix align check for npo2 kernel test robot
@ 2023-03-23 7:23 ` Yohan Joung
2023-03-23 23:47 ` Jaegeuk Kim
0 siblings, 1 reply; 6+ messages in thread
From: Yohan Joung @ 2023-03-23 7:23 UTC (permalink / raw)
To: lkp
Cc: chao, jaegeuk, jyh429, linux-f2fs-devel, linux-kernel,
oe-kbuild-all, Yohan Joung
Fix alignment check to be correct in npo2 as well
Signed-off-by: Yohan Joung <yohan.joung@sk.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) ||
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] f2fs: fix align check for npo2
2023-03-23 7:23 ` Yohan Joung
@ 2023-03-23 23:47 ` Jaegeuk Kim
2023-03-24 13:07 ` Yohan Joung
0 siblings, 1 reply; 6+ messages in thread
From: Jaegeuk Kim @ 2023-03-23 23:47 UTC (permalink / raw)
To: Yohan Joung
Cc: lkp, chao, linux-f2fs-devel, linux-kernel, oe-kbuild-all, Yohan Joung
On 03/23, Yohan Joung wrote:
> Fix alignment check to be correct in npo2 as well
>
> Signed-off-by: Yohan Joung <yohan.joung@sk.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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] f2fs: fix align check for npo2
2023-03-23 23:47 ` Jaegeuk Kim
@ 2023-03-24 13:07 ` Yohan Joung
2023-04-01 1:49 ` [f2fs-dev] " Chao Yu
0 siblings, 1 reply; 6+ messages in thread
From: Yohan Joung @ 2023-03-24 13:07 UTC (permalink / raw)
To: jaegeuk
Cc: jyh429, linux-f2fs-devel, linux-kernel, lkp, oe-kbuild-all, Yohan Joung
Fix alignment check to be correct in npo2 as well
Signed-off-by: Yohan Joung <yohan.joung@sk.com>
---
fs/f2fs/segment.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 055e70e77aa2..f4a22a065277 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -1842,6 +1842,7 @@ static int __f2fs_issue_discard_zone(struct f2fs_sb_info *sbi,
sector_t sector, nr_sects;
block_t lblkstart = blkstart;
int devi = 0;
+ u32 remainder = 0;
if (f2fs_is_multi_device(sbi)) {
devi = f2fs_target_device_index(sbi, blkstart);
@@ -1857,9 +1858,9 @@ static int __f2fs_issue_discard_zone(struct f2fs_sb_info *sbi,
if (f2fs_blkz_is_seq(sbi, devi, blkstart)) {
sector = SECTOR_FROM_BLOCK(blkstart);
nr_sects = SECTOR_FROM_BLOCK(blklen);
+ div_u64_rem(sector, bdev_zone_sectors(bdev), &remainder);
- if (sector & (bdev_zone_sectors(bdev) - 1) ||
- nr_sects != bdev_zone_sectors(bdev)) {
+ if (remainder || 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 : "",
blkstart, blklen);
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: fix align check for npo2
2023-03-24 13:07 ` Yohan Joung
@ 2023-04-01 1:49 ` Chao Yu
2023-04-02 3:17 ` Yohan Joung
0 siblings, 1 reply; 6+ messages in thread
From: Chao Yu @ 2023-04-01 1:49 UTC (permalink / raw)
To: Yohan Joung, jaegeuk; +Cc: lkp, linux-kernel, linux-f2fs-devel, oe-kbuild-all
On 2023/3/24 21:07, Yohan Joung wrote:
> Fix alignment check to be correct in npo2 as well
>
> Signed-off-by: Yohan Joung <yohan.joung@sk.com>
> ---
> fs/f2fs/segment.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index 055e70e77aa2..f4a22a065277 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -1842,6 +1842,7 @@ static int __f2fs_issue_discard_zone(struct f2fs_sb_info *sbi,
> sector_t sector, nr_sects;
> block_t lblkstart = blkstart;
> int devi = 0;
> + u32 remainder = 0;
>
> if (f2fs_is_multi_device(sbi)) {
> devi = f2fs_target_device_index(sbi, blkstart);
> @@ -1857,9 +1858,9 @@ static int __f2fs_issue_discard_zone(struct f2fs_sb_info *sbi,
> if (f2fs_blkz_is_seq(sbi, devi, blkstart)) {
> sector = SECTOR_FROM_BLOCK(blkstart);
> nr_sects = SECTOR_FROM_BLOCK(blklen);
> + div_u64_rem(sector, bdev_zone_sectors(bdev), &remainder);
Should use div64_u64_rem()? As both sector and return value of bdev_zone_sectors()
are u64.
Thanks,
>
> - if (sector & (bdev_zone_sectors(bdev) - 1) ||
> - nr_sects != bdev_zone_sectors(bdev)) {
> + if (remainder || 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 : "",
> blkstart, blklen);
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [f2fs-dev] [PATCH] f2fs: fix align check for npo2
2023-04-01 1:49 ` [f2fs-dev] " Chao Yu
@ 2023-04-02 3:17 ` Yohan Joung
0 siblings, 0 replies; 6+ messages in thread
From: Yohan Joung @ 2023-04-02 3:17 UTC (permalink / raw)
To: 'Chao Yu', jaegeuk
Cc: lkp, linux-kernel, linux-f2fs-devel, oe-kbuild-all
> -----Original Message-----
> From: Chao Yu [mailto:chao@kernel.org]
> Sent: Saturday, April 1, 2023 10:49 AM
> To: Yohan Joung; jaegeuk@kernel.org
> Cc: lkp@intel.com; linux-kernel@vger.kernel.org; linux-f2fs-
> devel@lists.sourceforge.net; oe-kbuild-all@lists.linux.dev
> Subject: Re: [f2fs-dev] [PATCH] f2fs: fix align check for npo2
>
> On 2023/3/24 21:07, Yohan Joung wrote:
> > Fix alignment check to be correct in npo2 as well
> >
> > Signed-off-by: Yohan Joung <yohan.joung@sk.com>
> > ---
> > fs/f2fs/segment.c | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index
> > 055e70e77aa2..f4a22a065277 100644
> > --- a/fs/f2fs/segment.c
> > +++ b/fs/f2fs/segment.c
> > @@ -1842,6 +1842,7 @@ static int __f2fs_issue_discard_zone(struct
> f2fs_sb_info *sbi,
> > sector_t sector, nr_sects;
> > block_t lblkstart = blkstart;
> > int devi = 0;
> > + u32 remainder = 0;
> >
> > if (f2fs_is_multi_device(sbi)) {
> > devi = f2fs_target_device_index(sbi, blkstart); @@ -1857,9
> +1858,9
> > @@ static int __f2fs_issue_discard_zone(struct f2fs_sb_info *sbi,
> > if (f2fs_blkz_is_seq(sbi, devi, blkstart)) {
> > sector = SECTOR_FROM_BLOCK(blkstart);
> > nr_sects = SECTOR_FROM_BLOCK(blklen);
> > + div_u64_rem(sector, bdev_zone_sectors(bdev), &remainder);
>
> Should use div64_u64_rem()? As both sector and return value of
> bdev_zone_sectors() are u64.
>
> Thanks,
Upload based on your comments.
Thanks
>
> >
> > - if (sector & (bdev_zone_sectors(bdev) - 1) ||
> > - nr_sects != bdev_zone_sectors(bdev)) {
> > + if (remainder || 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 : "",
> > blkstart, blklen);
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-04-02 3:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20230322131408.1192-1-jyh429@gmail.com>
2023-03-23 2:37 ` [PATCH] f2fs: fix align check for npo2 kernel test robot
2023-03-23 7:23 ` Yohan Joung
2023-03-23 23:47 ` Jaegeuk Kim
2023-03-24 13:07 ` Yohan Joung
2023-04-01 1:49 ` [f2fs-dev] " Chao Yu
2023-04-02 3:17 ` Yohan Joung
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).