Re: [PATCH V2] f2fs: fix atgc bug on issue in 32bits platform

From: Arnd Bergmann
Date: Thu Nov 10 2022 - 04:07:51 EST


On Thu, Nov 10, 2022, at 09:33, kernel test robot wrote:
> Hi zhiguo.niu",
>
> Thank you for the patch! Perhaps something to improve:
>
> [auto build test WARNING on jaegeuk-f2fs/dev-test]
> [also build test WARNING on linus/master v6.1-rc4 next-20221109]
> [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/zhiguo-niu/f2fs-fix-atgc-bug-on-issue-in-32bits-platform/20221108-153745
> base:
> https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git
> dev-test
> patch link:
> https://lore.kernel.org/r/1667889638-9106-1-git-send-email-zhiguo.niu%40unisoc.com
> patch subject: [PATCH V2] f2fs: fix atgc bug on issue in 32bits platform
> All warnings (new ones prefixed by >>):
>
> In file included from fs/f2fs/gc.c:22:
>>> fs/f2fs/gc.h:65:2: warning: field within 'struct victim_entry' is less aligned than 'union victim_entry::(anonymous at fs/f2fs/gc.h:65:2)' and is usually due to 'struct victim_entry' being packed, which can lead to unaligned accesses [-Wunaligned-access]
> union {

It looks like the problem is the extra unqualified __packed annotation
inside of 'struct rb_entry'. Removing that is probably better than
adding extra __packed annotation that just lead to less efficient
code.

Arnd