btrfs: deprecate integrity checker feature
authorQu Wenruo <wqu@suse.com>
Mon, 26 Jun 2023 09:55:25 +0000 (17:55 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Aug 2023 12:52:13 +0000 (14:52 +0200)
The integrity checker feature needs to be enabled at compile time
(BTRFS_FS_CHECK_INTEGRITY) and then enabled by mount options check_int*.

Although it provides some unique features which can not be provided by
any other sanity checks like tree-checker, it does not only have high
CPU and memory overhead, but is also a maintenance burden.

For example, it's the only caller of btrfs_map_block() with
@need_raid_map = 0.

Considering most btrfs developers are not even testing this feature, I'm
here to propose deprecation of this feature.

For now only warning messages will be printed, the feature itself would
still work.

Removal time has been set to 6.7 release.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/Kconfig
fs/btrfs/super.c

index 66fa9ab2c046293d45e293f097e9b7dbed6871c5..3282adc84d5215bf6439faca37874a6af22c3096 100644 (file)
@@ -49,9 +49,11 @@ config BTRFS_FS_POSIX_ACL
          If you don't know what Access Control Lists are, say N
 
 config BTRFS_FS_CHECK_INTEGRITY
-       bool "Btrfs with integrity check tool compiled in (DANGEROUS)"
+       bool "Btrfs with integrity check tool compiled in (DEPRECATED)"
        depends on BTRFS_FS
        help
+         This feature has been deprecated and will be removed in 6.7.
+
          Adds code that examines all block write requests (including
          writes of the super block). The goal is to verify that the
          state of the filesystem on disk is always consistent, i.e.,
index f1dd172d8d5bd75626deb8287618c1afc017fbdb..cffdd6f7f8e8bb0e46bdbd30128d4b8795574d65 100644 (file)
@@ -709,12 +709,16 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options,
                        break;
 #ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY
                case Opt_check_integrity_including_extent_data:
+                       btrfs_warn(info,
+       "integrity checker is deprecated and will be removed in 6.7");
                        btrfs_info(info,
                                   "enabling check integrity including extent data");
                        btrfs_set_opt(info->mount_opt, CHECK_INTEGRITY_DATA);
                        btrfs_set_opt(info->mount_opt, CHECK_INTEGRITY);
                        break;
                case Opt_check_integrity:
+                       btrfs_warn(info,
+       "integrity checker is deprecated and will be removed in 6.7");
                        btrfs_info(info, "enabling check integrity");
                        btrfs_set_opt(info->mount_opt, CHECK_INTEGRITY);
                        break;
@@ -727,6 +731,8 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options,
                                goto out;
                        }
                        info->check_integrity_print_mask = intarg;
+                       btrfs_warn(info,
+       "integrity checker is deprecated and will be removed in 6.7");
                        btrfs_info(info, "check_integrity_print_mask 0x%x",
                                   info->check_integrity_print_mask);
                        break;