From patchwork Mon Jun 26 09:55:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 13292593 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82334EB64D7 for ; Mon, 26 Jun 2023 09:55:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229582AbjFZJzr (ORCPT ); Mon, 26 Jun 2023 05:55:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbjFZJzq (ORCPT ); Mon, 26 Jun 2023 05:55:46 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A79359B for ; Mon, 26 Jun 2023 02:55:44 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 5FCF1211E2 for ; Mon, 26 Jun 2023 09:55:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1687773343; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=TKU0XFHspazEWapKGTDATIUhyvjyIxCJ2kc/Ym0DRqw=; b=ga5XwGt9nm5vwXMp5KQxxTHSzJOpvcXCJefcvidhkJDVlBVh1MNCF4GYl/HQ9h4HCKJxyv MxDUHiOJA6v/6+O5lfBuSMEsZgPdDLFBeSAwoBRhRMV6MLaWYkfH20+AQvq1KydMl/vtr8 7s3Ujrq8x7ameyonvQdulABchUH7cNA= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B71BC13905 for ; Mon, 26 Jun 2023 09:55:42 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id bLNMIJ5gmWQ+fQAAMHmgww (envelope-from ) for ; Mon, 26 Jun 2023 09:55:42 +0000 From: Qu Wenruo To: linux-btrfs@vger.kernel.org Subject: [PATCH] btrfs: deprecate check_int* feature Date: Mon, 26 Jun 2023 17:55:25 +0800 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Check_int feature needs to be enabled at compile time and then enable through mount option. Although it provides some unique feature which can not be provided by any other sanity checks, it does not only have high CPU and memory overhead, but also maintenance burden. For example, check_int is 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 purpose the deprecation of this feature. For now only extra warning messages would be outputted, the feature itself would still work. Signed-off-by: Qu Wenruo Reviewed-by: Christoph Hellwig --- fs/btrfs/super.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 8b1c1225245e..3eaa0775cef1 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -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, + "check_int feature is marked deprecated and would be removed soon"); 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, + "check_int feature is marked deprecated and would be removed soon"); 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, + "check_int feature is marked deprecated and would be removed soon"); btrfs_info(info, "check_integrity_print_mask 0x%x", info->check_integrity_print_mask); break;