Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp358955pxb; Wed, 14 Apr 2021 17:46:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqqQrUsaFroz5pw2Ln9rYJoQiI9DDkNxWGXHFkgNKppGsOUQgruN70GazjRUfLRLWExWBE X-Received: by 2002:a05:6402:2786:: with SMTP id b6mr1030963ede.310.1618447604699; Wed, 14 Apr 2021 17:46:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618447604; cv=none; d=google.com; s=arc-20160816; b=LrvxG8iLj1nwGZjjcRJ757KiCKvDdkpSeEEGBVlpw9DYPCTJgUS9qIlumxzFOTrbYt sSvQZYCDqf28U7m3djLGIEYKeVhKBm+l0tTyNcme3CUvUHXtHIVgoiYUppdiALwg5QQf r0X6LWavBZDIfnmJ8+y1tNDEFPQPDDVti7QC4gKioFARmGkHQQggQVLeHwZWsMOeQVsF ggkB5gpItr6Gd3NKIa8v3+aOD2pANzHaiW4kZEC5aBt5Dlq/4zXL6RPGbeXqxyTInDmN ssNl5bVq6m6ZOC8wXab9jdQpKWIOXL8FIi7M2TAcuvln+wrasZa0pYzT2y48PjhJkeVZ WXsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=6epim1FBsbH0h10jg7hWAW87+jSklZyfcZ6fpYJc2k8=; b=jpd4PQHFAO4mj4p8NjzyAg6553G227J7gUyGYrXG2bIE7I+CClTnD8u0bbuHDVMewo 9Rm+FAKGr6OyBgJxVTnHkCWhsFEsCEPZzjrXuUmeQU2hYoc7s68xEsC4md9aAOXHqioE D7wVaN8mtwvDdHMTXDf6B7MvZ8cjrGw0DlM1xPgi22fq/0OztXgaEsvN8hMrv+sxURyM tkyo1Y+WoiFsqP3iQ2yaLJc82LSC8pVv0lccdl7aI8wxamhMEu+NRF6QGqB3vGBAqepj rFVbpcelecOADesM7Z6QBzg3DqajYRm5OX6vNfsQv2VG2zaxmb9B1ZJDC9LMvbsRkGKN mwoA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-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 b1si742966ejh.35.2021.04.14.17.46.21; Wed, 14 Apr 2021 17:46:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232086AbhDNUrv (ORCPT + 99 others); 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-ext4@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);