Skip to contentSkip to conversation

btrfs: Select LIBCRC32C again

PATCH In review Guenter Roeck 2 participants 3 messages Jul 8, 2019 – Jul 17, 2019 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs: Select LIBCRC32C again

With CONFIG_BTRFS_FS=y and CONFIG_CRYPTO_CRC32C=m, we get:

fs/btrfs/super.o: In function `btrfs_mount_root':
fs/btrfs/super.c:1557: undefined reference to crc32c_impl' fs/btrfs/super.o: In function btrfs_print_mod_info':
fs/btrfs/super.c:2348: undefined reference to crc32c_impl' fs/btrfs/extent-tree.o: In function btrfs_crc32c':
fs/btrfs/ctree.h:2609: undefined reference to crc32c' fs/btrfs/ctree.h:2609: undefined reference to crc32c' fs/btrfs/ctree.h:2609: undefined reference to crc32c' fs/btrfs/dir-item.o: In function btrfs_name_hash':
fs/btrfs/ctree.h:2619: undefined reference to crc32c' fs/btrfs/ctree.h:2619: undefined reference to crc32c'

and more.

Note that the comment in the offending commit "The module dependency on crc32c is preserved via MODULE_SOFTDEP("pre: crc32c"), which was previously provided by LIBCRC32C config option doing the same." is wrong, since it permits CONFIG_BTRFS_FS=y in combination with CONFIG_CRYPTO_CRC32C=m.

Cc David Sterba <[email protected]>
Fixes d5178578bcd4 ("btrfs: directly call into crypto framework for checksumming")
---
 fs/btrfs/Kconfig | 1 +
 1 file changed, 1 insertion(+)
fs/btrfs/Kconfig +1 -0
index 212b4a854f2c..4c80c70597f9 100644
@@ -2,6 +2,7 @@
 
 config BTRFS_FS
 	tristate "Btrfs filesystem support"
+	select LIBCRC32C
 	select CRYPTO
 	select CRYPTO_CRC32C
 	select ZLIB_INFLATE
Signature · 1 line
2.7.4
#1 lore raw
Quoted 14 lines · Guenter Roeck

With CONFIG_BTRFS_FS=y and CONFIG_CRYPTO_CRC32C=m, we get:

fs/btrfs/super.o: In function `btrfs_mount_root':
fs/btrfs/super.c:1557: undefined reference to crc32c_impl' fs/btrfs/super.o: In function btrfs_print_mod_info':
fs/btrfs/super.c:2348: undefined reference to crc32c_impl' fs/btrfs/extent-tree.o: In function btrfs_crc32c':
fs/btrfs/ctree.h:2609: undefined reference to crc32c' fs/btrfs/ctree.h:2609: undefined reference to crc32c' fs/btrfs/ctree.h:2609: undefined reference to crc32c' fs/btrfs/dir-item.o: In function btrfs_name_hash':
fs/btrfs/ctree.h:2619: undefined reference to crc32c' fs/btrfs/ctree.h:2619: undefined reference to crc32c'

Quoted 7 lines

and more.

Note that the comment in the offending commit "The module dependency on crc32c is preserved via MODULE_SOFTDEP("pre: crc32c"), which was previously provided by LIBCRC32C config option doing the same." is wrong, since it permits CONFIG_BTRFS_FS=y in combination with CONFIG_CRYPTO_CRC32C=m.

Meh, that should have been CONFIG_LIBCRC32C=m. Sorry for the confusion.

Anyway, I'll select CONFIG_LIBCRC32C=y in conjunction with CONFIG_BTRFS_FS=y in my own build/boot tests going forward. That won't fix the problem, but it will avoid loss of test coverage.

Guenter

Quoted 22 lines
Cc David Sterba <[email protected]>
Fixes d5178578bcd4 ("btrfs: directly call into crypto framework for checksumming")
---
 fs/btrfs/Kconfig | 1 +
 1 file changed, 1 insertion(+)
fs/btrfs/Kconfig +1 -0
index 212b4a854f2c..4c80c70597f9 100644
@@ -2,6 +2,7 @@
 
 config BTRFS_FS
 	tristate "Btrfs filesystem support"
+	select LIBCRC32C
 	select CRYPTO
 	select CRYPTO_CRC32C
 	select ZLIB_INFLATE
Signature · 1 line
2.7.4
#2 lore raw
In reply to Guenter Roeck
Quoted 16 lines · Guenter Roeck

With CONFIG_BTRFS_FS=y and CONFIG_CRYPTO_CRC32C=m, we get:

fs/btrfs/super.o: In function `btrfs_mount_root':
fs/btrfs/super.c:1557: undefined reference to crc32c_impl' fs/btrfs/super.o: In function btrfs_print_mod_info':
fs/btrfs/super.c:2348: undefined reference to crc32c_impl' fs/btrfs/extent-tree.o: In function btrfs_crc32c':
fs/btrfs/ctree.h:2609: undefined reference to crc32c' fs/btrfs/ctree.h:2609: undefined reference to crc32c' fs/btrfs/ctree.h:2609: undefined reference to crc32c' fs/btrfs/dir-item.o: In function btrfs_name_hash':
fs/btrfs/ctree.h:2619: undefined reference to crc32c' fs/btrfs/ctree.h:2619: undefined reference to crc32c'

and more.

Quoted 8 lines

Note that the comment in the offending commit "The module dependency on crc32c is preserved via MODULE_SOFTDEP("pre: crc32c"), which was previously provided by LIBCRC32C config option doing the same." is wrong, since it permits CONFIG_BTRFS_FS=y in combination with CONFIG_CRYPTO_CRC32C=m.

Cc David Sterba <[email protected]>
Fixes d5178578bcd4 ("btrfs: directly call into crypto framework for checksumming")

We already got another fix that is scheduled for post rc1 pull request.