Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp949387ybk; Fri, 15 May 2020 18:49:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/kEvStTBL1zh8WAmFrHN3rJy3av0CpGE6Pf5bycB1vNNVWyQEWnZrTlmnqW35hwU3qx7Z X-Received: by 2002:a05:6402:617:: with SMTP id n23mr5490301edv.107.1589593798395; Fri, 15 May 2020 18:49:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589593798; cv=none; d=google.com; s=arc-20160816; b=KlYmN7vT+zj+tP6xF2EPaKY4MAvyu/lpVawY/FT/5Vc1HDyrROAibOD95ybp8rhLYY lDGuaIg1kxf0LNwuZulr/NTQgFUj7H8YYKdV2GZVMEmfO4QgBR1fbTPwhvzSk/TXCOck poibyigvntUxyQ1Fg3jQuNIEKUxx5AieCUpbTz52yNImEiXzQB6NrRRLJB1vgk+acl1v bmhoVOpFmc/AL1lNYyeEFoAXkBmMG36w3cT0YrWXxFyR99Wn/dILH7YiLjpWYVInGNfd yKsKL7qlG16w0qn3fXlbF439mF1UW850SMedTadBqZ/X/otIxxWC85DkPbfi6622gh57 /hUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=DNmSsdl/eDXtjUbmVo0WAUpX53JZmIuAHIzsxry8Pbc=; b=VWuFKtzV2o6raf2yVbmC4wNePjQ2YOXhUGl7+lSx7dPiJRYDQbzDlBmW7fp17DGAA3 9wvzoyU6z6svqYA4TnTn6PDVIWdjFYU6b6QK1ITGWnXdZ+vgW1+izp48eEdg0UixXQXZ aHNjkBV1yX/gNbWpBFol+KJfh+M+cQLm22Bc1Mvjvt5ofSOLzaVVmyg5feOCdC/+4TVM 093RODeXSCCY103v/2w9BrocaoEpTiIva54Ijuk3cVm1KDJsXXr/psFQWIolniyATUaa jRm/3EhDLM0cmZoTL6rCDWTu7v61tRQsHRrHMoN+zDYNDbJy6Vmcz49WfULt+lHMQLKT r43g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hJNgi+Zo; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ce18si2518065edb.26.2020.05.15.18.49.24; Fri, 15 May 2020 18:49:58 -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; dkim=pass header.i=@kernel.org header.s=default header.b=hJNgi+Zo; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727801AbgEPBtT (ORCPT + 99 others); Fri, 15 May 2020 21:49:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:33770 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726247AbgEPBtT (ORCPT ); Fri, 15 May 2020 21:49:19 -0400 Received: from sol.localdomain (c-107-3-166-239.hsd1.ca.comcast.net [107.3.166.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 605F1207BB; Sat, 16 May 2020 01:49:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589593758; bh=rNgC9Av8/awoQKHVkrrrbimQ/X1+g+/VCLMQh1wNG1g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hJNgi+ZomU2YTxsBjCbe2QJTpuDs9IiQb8zA0Gl04r5yBvxKjcsW9KPd4lj/e2JNh b/jXMS3Wq0KxGiZmhPHKSkY3E/wlmhwfBypn6MFSdMPjo8XtmPJxI5xiHkuRJRg/CL or18Dd5tcT5/fCn/9tqnYE+5LgBud0+YCF90g9qQ= Date: Fri, 15 May 2020 18:49:16 -0700 From: Eric Biggers To: ira.weiny@intel.com Cc: linux-ext4@vger.kernel.org, Andreas Dilger , "Theodore Y. Ts'o" , Jan Kara , Al Viro , Dan Williams , Dave Chinner , Christoph Hellwig , Jeff Moyer , "Darrick J. Wong" , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/9] fs/ext4: Disallow verity if inode is DAX Message-ID: <20200516014916.GF1009@sol.localdomain> References: <20200513054324.2138483-1-ira.weiny@intel.com> <20200513054324.2138483-3-ira.weiny@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200513054324.2138483-3-ira.weiny@intel.com> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, May 12, 2020 at 10:43:17PM -0700, ira.weiny@intel.com wrote: > From: Ira Weiny > > Verity and DAX are incompatible. Changing the DAX mode due to a verity > flag change is wrong without a corresponding address_space_operations > update. > > Make the 2 options mutually exclusive by returning an error if DAX was > set first. > > (Setting DAX is already disabled if Verity is set first.) > > Signed-off-by: Ira Weiny > > --- > Changes: > remove WARN_ON_ONCE > Add documentation for DAX/Verity exclusivity > --- > Documentation/filesystems/ext4/verity.rst | 7 +++++++ > fs/ext4/verity.c | 3 +++ > 2 files changed, 10 insertions(+) > > diff --git a/Documentation/filesystems/ext4/verity.rst b/Documentation/filesystems/ext4/verity.rst > index 3e4c0ee0e068..51ab1aa17e59 100644 > --- a/Documentation/filesystems/ext4/verity.rst > +++ b/Documentation/filesystems/ext4/verity.rst > @@ -39,3 +39,10 @@ is encrypted as well as the data itself. > > Verity files cannot have blocks allocated past the end of the verity > metadata. > + > +Verity and DAX > +-------------- > + > +Verity and DAX are not compatible and attempts to set both of these flags on a > +file will fail. > + If you build the documentation, this shows up as its own subsection "2.13. Verity and DAX" alongside "2.12. Verity files", which looks odd. I think you should delete this new subsection header so that this paragraph goes in the existing "Verity files" subsection. Also, Documentation/filesystems/fsverity.rst already mentions DAX (similar to fscrypt.rst). Is it intentional that you added this to the ext4-specific documentation instead? - Eric