Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp946031ybt; Wed, 17 Jun 2020 18:40:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKbgsTUjm4ikVIPeBX/pQW8RrjovkK8t/Rw9Ysid+beSG5lhDy8/07mZkq687yzT4thUqT X-Received: by 2002:a05:6402:8d1:: with SMTP id d17mr1817212edz.38.1592444450377; Wed, 17 Jun 2020 18:40:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592444450; cv=none; d=google.com; s=arc-20160816; b=LAU2SWptJxpTeS/uyoriaSrzl+VIFZUPxX5ciF+8mU0+p/MdMlc5sTv14XBYcS42t1 bAKGDqTkg1aC1GdCL7Fc5t7mCBbT2VRHW+uEplXRiHeT9sSLFQnqQ0TLkgfSrRZ0Z99Q 8JVGZhkZDu/OdIeVeThJFo63wzad7Q40lXtgKhaAFWJ5I/bjTj4+1xCA50mQszD4/0fu pQudXOuCmsKQkX0wUsbUZCeopttfFZ6PAV3SK7xRYLnV/ZvLxgTrFeqBnoShyXQYjn9t Z6qnaaFExtC0Tk83qqB6uhRQ8YGU+Ae5Dvnaoe2LpNuXXb9ETcIMBv+xqTwIiveG4jAX Y1aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=GD8+nqSZXmAIjAnqZCnCIdu/FpBbCWXKROEQVLCAYeM=; b=Tfpt8OREX8lkqVoZiOaZ1Q8WExfZPInbp9nMvQ00yE6NkXwyoOhWoyPN0Z3bnp4179 U62LtQq5Rhhz+sXA/k46hOu98SdqW0M0ZccYBJ/73gwZssiJq0H83aGPR9bZCi4m43Fp LHPrzJaMT5qgnn3mGsIAazHam/sfPNvqhEoozRCDBNXOMjGRPDn3IxyF9dzeqdsxSA1a PNFPrrXEGTu769LVftSwXGFvfZrYWJfO68lMPfTlpoEpw4DdRt99pO/8ZbS0T2drDfrT r1oqJMToN++8UmexBNr30yPSxrUkvDzErXdo+rlCjjUumWP2fXvfIbRAFr1Tkp2fSSG3 MHOg== 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 m10si957733ejc.104.2020.06.17.18.40.27; Wed, 17 Jun 2020 18:40:50 -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 S1728817AbgFRBjE (ORCPT + 99 others); Wed, 17 Jun 2020 21:39:04 -0400 Received: from [211.29.132.59] ([211.29.132.59]:40327 "EHLO mail108.syd.optusnet.com.au" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1726920AbgFRBjD (ORCPT ); Wed, 17 Jun 2020 21:39:03 -0400 X-Greylist: delayed 1156 seconds by postgrey-1.27 at vger.kernel.org; Wed, 17 Jun 2020 21:39:02 EDT Received: from dread.disaster.area (unknown [49.180.124.177]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id BB9BD1AEAF2; Thu, 18 Jun 2020 11:19:20 +1000 (AEST) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1jljCy-0001gV-Fl; Thu, 18 Jun 2020 11:19:12 +1000 Date: Thu, 18 Jun 2020 11:19:12 +1000 From: Dave Chinner To: Satya Tangirala Cc: linux-fscrypt@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-ext4@vger.kernel.org Subject: Re: [PATCH 1/4] fs: introduce SB_INLINECRYPT Message-ID: <20200618011912.GA2040@dread.disaster.area> References: <20200617075732.213198-1-satyat@google.com> <20200617075732.213198-2-satyat@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200617075732.213198-2-satyat@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.3 cv=W5xGqiek c=1 sm=1 tr=0 a=k3aV/LVJup6ZGWgigO6cSA==:117 a=k3aV/LVJup6ZGWgigO6cSA==:17 a=kj9zAlcOel0A:10 a=nTHF0DUjJn0A:10 a=1XWaLZrsAAAA:8 a=7-415B0cAAAA:8 a=Yn2aIsqHhkDqJBDDX5kA:9 a=CjuIK1q_8ugA:10 a=biEYGPWJfzWAr4FL6Ov7:22 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Jun 17, 2020 at 07:57:29AM +0000, Satya Tangirala wrote: > Introduce SB_INLINECRYPT, which is set by filesystems that wish to use > blk-crypto for file content en/decryption. This flag maps to the > '-o inlinecrypt' mount option which multiple filesystems will implement, > and code in fs/crypto/ needs to be able to check for this mount option > in a filesystem-independent way. > > Signed-off-by: Satya Tangirala > --- > fs/proc_namespace.c | 1 + > include/linux/fs.h | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/fs/proc_namespace.c b/fs/proc_namespace.c > index 3059a9394c2d..e0ff1f6ac8f1 100644 > --- a/fs/proc_namespace.c > +++ b/fs/proc_namespace.c > @@ -49,6 +49,7 @@ static int show_sb_opts(struct seq_file *m, struct super_block *sb) > { SB_DIRSYNC, ",dirsync" }, > { SB_MANDLOCK, ",mand" }, > { SB_LAZYTIME, ",lazytime" }, > + { SB_INLINECRYPT, ",inlinecrypt" }, > { 0, NULL } > }; > const struct proc_fs_opts *fs_infop; NACK. SB_* flgs are for functionality enabled on the superblock, not for indicating mount options that have been set by the user. If the mount options are directly parsed by the filesystem option parser (as is done later in this patchset), then the mount option setting should be emitted by the filesystem's ->show_options function, not a generic function. The option string must match what the filesystem defines, not require separate per-filesystem and VFS definitions of the same option that people could potentially get wrong (*cough* i_version vs iversion *cough*).... Cheers, Dave. -- Dave Chinner david@fromorbit.com