Skip to contentSkip to conversation

f2fs: add MODULE_SOFTDEP to ensure crc32c is included in the initramfs

PATCH Superseded Chao Yu 2 participants 3 messages May 17, 2021 – May 18, 2021 F2FS file system

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Chao Yu

author
#0 lore raw

PATCH 1/1 f2fs: add MODULE_SOFTDEP to ensure crc32c is included in the initramfs

As marcosfrm reported in bugzilla:

https://bugzilla.kernel.org/show_bug.cgi?id=213089

Initramfs generators rely on "pre" softdeps (and "depends") to include additional required modules.

F2FS does not declare "pre: crc32" softdep. Then every generator (dracut, mkinitcpio...) has to maintain a hardcoded list for this purpose.

Hence let's use MODULE_SOFTDEP("pre: crc32") in f2fs code.

Fixes 43b6573bac95 ("f2fs: use cryptoapi crc32 functions")
---
 fs/f2fs/super.c | 1 +
 1 file changed, 1 insertion(+)
fs/f2fs/super.c +1 -0
index 3f8a7a6c250c..fa0ce6301c16 100644
@@ -4431,4 +4431,5 @@ module_exit(exit_f2fs_fs)
 MODULE_AUTHOR("Samsung Electronics's Praesto Team");
 MODULE_DESCRIPTION("Flash Friendly File System");
 MODULE_LICENSE("GPL");
+MODULE_SOFTDEP("pre: crc32c");
 
Signature · 1 line
2.29.2
#1 lore raw
Quoted 24 lines · Chao Yu

As marcosfrm reported in bugzilla:

https://bugzilla.kernel.org/show_bug.cgi?id=213089

Initramfs generators rely on "pre" softdeps (and "depends") to include additional required modules.

F2FS does not declare "pre: crc32" softdep. Then every generator (dracut, mkinitcpio...) has to maintain a hardcoded list for this purpose.

Hence let's use MODULE_SOFTDEP("pre: crc32") in f2fs code.

Fixes 43b6573bac95 ("f2fs: use cryptoapi crc32 functions")
---
 fs/f2fs/super.c | 1 +
 1 file changed, 1 insertion(+)
fs/f2fs/super.c +0 -0
index 3f8a7a6c250c..fa0ce6301c16 100644

fs/f2fs/super.c module_exit(exit_f2fs_fs) · line 4434

Quoted 4 lines
fs/f2fs/super.c +1 -0
@@ -4431,4 +4431,5 @@ module_exit(exit_f2fs_fs)
 MODULE_AUTHOR("Samsung Electronics's Praesto Team");
 MODULE_DESCRIPTION("Flash Friendly File System");
 MODULE_LICENSE("GPL");
+MODULE_SOFTDEP("pre: crc32c");

Shouldn't it be crc32, not crc32c?

- Eric

_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

author
#2 lore raw
Quoted 20 lines · Eric Biggers
Quoted 19 lines · Chao Yu

As marcosfrm reported in bugzilla:

https://bugzilla.kernel.org/show_bug.cgi?id=213089

Initramfs generators rely on "pre" softdeps (and "depends") to include additional required modules.

F2FS does not declare "pre: crc32" softdep. Then every generator (dracut, mkinitcpio...) has to maintain a hardcoded list for this purpose.

Hence let's use MODULE_SOFTDEP("pre: crc32") in f2fs code.

Fixes 43b6573bac95 ("f2fs: use cryptoapi crc32 functions")
---
  fs/f2fs/super.c | 1 +
  1 file changed, 1 insertion(+)
Quoted 11 lines

fs/f2fs/super.c module_exit(exit_f2fs_fs) · line 4434

Quoted 9 lines
fs/f2fs/super.c +1 -0
index 3f8a7a6c250c..fa0ce6301c16 100644
@@ -4431,4 +4431,5 @@ module_exit(exit_f2fs_fs)
  MODULE_AUTHOR("Samsung Electronics's Praesto Team");
  MODULE_DESCRIPTION("Flash Friendly File System");
  MODULE_LICENSE("GPL");
+MODULE_SOFTDEP("pre: crc32c");

Shouldn't it be crc32, not crc32c?

Thanks for the review, will fix.

Thanks,

Quoted 4 lines

- Eric
.