Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1585289pxb; Mon, 22 Feb 2021 06:02:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJxm955vsOwVpGG7rKUGYCPN3VfHA58aJ3B10F4mzgiamOPe5oAVWaX3xTvyxtY50aG93xDW X-Received: by 2002:a17:906:4b13:: with SMTP id y19mr14101201eju.139.1614002555939; Mon, 22 Feb 2021 06:02:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614002555; cv=none; d=google.com; s=arc-20160816; b=xVNOsvuPpa1qb2tDGhr8bUXFGfPzvlxho04+D1X/HlQeUn9O8PZnQA0SLtHO3FOVfT /beFpJ7QCy7OUipyqpOrsx4ORUo8PbnG1qRhNCDIq5IasRpqVVM/rXA5vx4QfVYpg+Xe KJjmUicOH40PJ3touaPPnQnXlft31GGxANBjNNGPKEkEiMn/jqmoOgN7KG6sooJmBawL mm0mY5vM3HKIYV8uSlkNmFxFeDj2W6UsunwrhIXiMiXobDH1dEmOsgh9XEr5oEi62ldw J4auMfwjVwhQTq952uLSYSiroD5Exm1AecB9B07S5wdx3v3O+P8reipD7zAe5QFvTG2b rFAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=6KxLQfL3cs+++N7PfdXHdQcoebtp+h5U/eLWU48xE+Y=; b=kglJt0C4D4sObA1HvMs20rMOtU0BCGxLPCAljobT/ALrdUNSePJfCSUbpRkm0lPD8q pfQN/QGvSkIbVNWTkDPqEwiyPO5H5xmbEVcfQ7bUw/TCobi4ZfADMKNSOs7PKt0wivY7 t6caJ6stG0mTN+wmn5ffD5I8iP8FEyBb7ucGXc9nCQOCmyr0hwVA/TBIJIS8sxkzMeuw Pk4WvBHNU4OngqOv5h/zfPkXXezdlmaESiY0WXZ3I1FvxeOzq+GIkY/5CtNwZc+UEufC GPAhbcwziP+IovTLMpLLDTeK7uROl2uoTR5RXAJN+MrF50EnxVyMg3UBf55wY5gcxdiF E8WA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ca11si11637633ejb.335.2021.02.22.06.02.12; Mon, 22 Feb 2021 06:02:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232140AbhBVOBk (ORCPT + 99 others); Mon, 22 Feb 2021 09:01:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231802AbhBVNAK (ORCPT ); Mon, 22 Feb 2021 08:00:10 -0500 Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0820BC06174A for ; Mon, 22 Feb 2021 04:59:24 -0800 (PST) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed20:254f:253d:debc:790b]) by albert.telenet-ops.be with bizsmtp id YCzP240011v7dkx06CzP0Y; Mon, 22 Feb 2021 13:59:23 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1lEAo6-000kYH-My; Mon, 22 Feb 2021 13:59:22 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1lEAo6-00HUVX-8I; Mon, 22 Feb 2021 13:59:22 +0100 From: Geert Uytterhoeven To: Jaegeuk Kim , Chao Yu , Masahiro Yamada , Randy Dunlap Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] f2fs: compress: Allow modular (de)compression algorithms Date: Mon, 22 Feb 2021 13:59:16 +0100 Message-Id: <20210222125916.4168804-1-geert@linux-m68k.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If F2FS_FS is modular, enabling the compressions options F2FS_FS_{LZ4,LZ4HZ,LZO,LZORLE,ZSTD} will make the (de)compression algorithms {LZ4,LZ4HC,LZO,ZSTD}_{,DE}COMPRESS builtin instead of modular, as the former depend on an intermediate boolean F2FS_FS_COMPRESSION, which in-turn depends on tristate F2FS_FS. Indeed, if a boolean symbol A depends directly on a tristate symbol B and selects another tristate symbol C: tristate B tristate C bool A depends on B select C and B is modular, then C will also be modular. However, if there is an intermediate boolean D in the dependency chain between A and B: tristate B tristate C bool D depends on B bool A depends on D select C then the modular state won't propagate from B to C, and C will be builtin instead of modular. Fix this by making the various compression options depend directly on F2FS_FS using a big if/endif block. Drop the now superfluous dependencies on F2FS_FS from individual symbols. Signed-off-by: Geert Uytterhoeven --- Perhaps the propagation logic in Kconfig should be fixed instead? Else people may reintroduce this issue when removing seemingly-unneeded dependencies. --- fs/f2fs/Kconfig | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/Kconfig b/fs/f2fs/Kconfig index 62e638a49bbf089a..20a82ecb72b42f84 100644 --- a/fs/f2fs/Kconfig +++ b/fs/f2fs/Kconfig @@ -20,9 +20,10 @@ config F2FS_FS If unsure, say N. +if F2FS_FS + config F2FS_STAT_FS bool "F2FS Status Information" - depends on F2FS_FS default y help /sys/kernel/debug/f2fs/ contains information about all the partitions @@ -35,7 +36,6 @@ config F2FS_STAT_FS config F2FS_FS_XATTR bool "F2FS extended attributes" - depends on F2FS_FS default y help Extended attributes are name:value pairs associated with inodes by @@ -70,7 +70,6 @@ config F2FS_FS_SECURITY config F2FS_CHECK_FS bool "F2FS consistency checking feature" - depends on F2FS_FS help Enables BUG_ONs which check the filesystem consistency in runtime. @@ -78,7 +77,6 @@ config F2FS_CHECK_FS config F2FS_FAULT_INJECTION bool "F2FS fault injection facility" - depends on F2FS_FS help Test F2FS to inject faults such as ENOMEM, ENOSPC, and so on. @@ -86,7 +84,6 @@ config F2FS_FAULT_INJECTION config F2FS_FS_COMPRESSION bool "F2FS compression feature" - depends on F2FS_FS help Enable filesystem-level compression on f2fs regular files, multiple back-end compression algorithms are supported. @@ -137,3 +134,5 @@ config F2FS_FS_LZORLE default y help Support LZO-RLE compress algorithm, if unsure, say Y. + +endif -- 2.25.1