From patchwork Wed Apr 14 20:47:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Theodore Ts'o X-Patchwork-Id: 12203777 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D495EC433B4 for ; Wed, 14 Apr 2021 20:47:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AAC816115C for ; Wed, 14 Apr 2021 20:47:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231195AbhDNUrv (ORCPT ); Wed, 14 Apr 2021 16:47:51 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:40567 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231415AbhDNUru (ORCPT ); Wed, 14 Apr 2021 16:47:50 -0400 Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 13EKlADN000584 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 14 Apr 2021 16:47:11 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id 6AEE915C3B35; Wed, 14 Apr 2021 16:47:10 -0400 (EDT) Date: Wed, 14 Apr 2021 16:47:10 -0400 From: "Theodore Ts'o" To: Christian Brauner Cc: Eryu Guan , Christian Brauner , fstests@vger.kernel.org, Christoph Hellwig , linux-ext4@vger.kernel.org, "Darrick J . Wong" , David Howells , Amir Goldstein Subject: [PATCH -RFC] ext4: add feature file to advertise that ext4 supports idmapped mounts Message-ID: References: <20210328223400.1800301-1-brauner@kernel.org> <20210328223400.1800301-3-brauner@kernel.org> <20210411151249.6y34x7yatqtpcvi6@wittgenstein> <20210411151857.wd6gd46u53vlh2xv@wittgenstein> <20210411153223.vhcegiklrwoczy55@wittgenstein> <20210412115426.a4bzsx4cp7jhx2ou@wittgenstein> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org On Mon, Apr 12, 2021 at 06:41:20PM -0400, Theodore Ts'o wrote: > In the ideal world, if the kernel wasn't compiled with the necessary > CONFIG options enabled, it's desirable of the test can detect that > fact and skip running the test instead failing and forcing the person > running the test to try to figure out whether this is a legitmate file > system bug or a just a test setup bug. So it would make it easier for me to manage running xfstests on ext4 if I had added something like this to ext4 and sent it to Linus before v5.12 is released. What do folks think? - Ted commit 20619aefe69d39e76083d8f8598653c2dca9b47e Author: Theodore Ts'o Date: Wed Apr 14 16:42:47 2021 -0400 ext4: add feature file to advertise that ext4 supports idmapped mounts This makes it easier for automated test suites to know whether it know whether we should test the functionality of the new idmapped mounts feature introduced in v5.12-rc1. Signed-off-by: Theodore Ts'o diff --git a/fs/ext4/sysfs.c b/fs/ext4/sysfs.c index a3d08276d441..101bf700c16b 100644 --- a/fs/ext4/sysfs.c +++ b/fs/ext4/sysfs.c @@ -313,6 +313,9 @@ EXT4_ATTR_FEATURE(verity); #endif EXT4_ATTR_FEATURE(metadata_csum_seed); EXT4_ATTR_FEATURE(fast_commit); +#ifdef CONFIG_USER_NS +EXT4_ATTR_FEATURE(idmapped_mount); +#endif static struct attribute *ext4_feat_attrs[] = { ATTR_LIST(lazy_itable_init), @@ -330,6 +333,9 @@ static struct attribute *ext4_feat_attrs[] = { #endif ATTR_LIST(metadata_csum_seed), ATTR_LIST(fast_commit), +#ifdef CONFIG_USER_NS + ATTR_LIST(idmapped_mount), +#endif NULL, }; ATTRIBUTE_GROUPS(ext4_feat);