Skip to contentSkip to conversation

btrfs: print if fsverity support is built in when loading module

PATCH In review David Sterba 3 participants 4 messages Jul 28, 2021 – Aug 5, 2021 Btrfs file system

lore
Share & tools
lore

David Sterba

author maintainer
#0 lore raw

PATCH 1/1 btrfs: print if fsverity support is built in when loading module

As fsverity support depends on a config option, print that at module load time like we do for similar features.

---
 fs/btrfs/super.c | 5 +++++
 1 file changed, 5 insertions(+)
fs/btrfs/super.c +5 -0
index 2bdc544b4c95..d444338db3c6 100644
@@ -2566,6 +2566,11 @@ static void __init btrfs_print_mod_info(void)
 			", zoned=yes"
 #else
 			", zoned=no"
+#endif
+#ifdef CONFIG_FS_VERITY
+			", fsverity=yes"
+#else
+			", fsverity=no"
 #endif
 			;
 	pr_info("Btrfs loaded, crc32c=%s%s\n", crc32c_impl(), options);
Signature · 1 line
2.31.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · David Sterba

As fsverity support depends on a config option, print that at module load time like we do for similar features.

So similarly /sys/fs/btrfs/features/fsverity may be required too?

Quoted 1 line

Thanks.

Quoted 21 lines
---
  fs/btrfs/super.c | 5 +++++
  1 file changed, 5 insertions(+)
fs/btrfs/super.c +5 -0
index 2bdc544b4c95..d444338db3c6 100644
@@ -2566,6 +2566,11 @@ static void __init btrfs_print_mod_info(void)
  			", zoned=yes"
  #else
  			", zoned=no"
+#endif
+#ifdef CONFIG_FS_VERITY
+			", fsverity=yes"
+#else
+			", fsverity=no"
  #endif
  			;
  	pr_info("Btrfs loaded, crc32c=%s%s\n", crc32c_impl(), options);
#2 lore raw
Quoted 5 lines · Anand Jain
Quoted 2 lines · David Sterba

As fsverity support depends on a config option, print that at module load time like we do for similar features.

So similarly /sys/fs/btrfs/features/fsverity may be required too?

Yes, feel free to send a patch.

#3 lore raw
Quoted 8 lines · David Sterba
Quoted 5 lines · Anand Jain
Quoted 2 lines · David Sterba

As fsverity support depends on a config option, print that at module load time like we do for similar features.

So similarly /sys/fs/btrfs/features/fsverity may be required too?

Yes, feel free to send a patch.

Oops. It's already there. Commit 6875cbd232c7 (btrfs: initial fsverity
support) added it.

Thanks, Anand