Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp3989177ybe; Mon, 16 Sep 2019 05:01:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqwL5IbgrK0Xk+zMj7EaJOUK66xCkQvQMMsp80ZzQFXNMCFH2f8L3iDKtl37DGlalc+lrcGh X-Received: by 2002:a50:a666:: with SMTP id d93mr16901722edc.217.1568635283472; Mon, 16 Sep 2019 05:01:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568635283; cv=none; d=google.com; s=arc-20160816; b=jxBc+qL7Zsd8+XgQFk0JWvwkOeiRmNasVjtBN94mZjHCTOxiOjEAXSHL4115Ky9kzB 5a84D78zc6VuKUiC4OMN48YSphmPR8I+Sk5AonTO2LaYBUWL5NSD5fsLvlYlkfLX17Uz VFCJoHxBLo3lYOjmsbu8sWLV2b9qs2XVq4aylWraGRjPmA4Ok2fq0ylwkodjjUCVt+D1 72gnsP39Z7LCpQrfRSd363x7tWcXnBMCsCNdXKEuJcjyjm5vTyCnFCX6Y3fwCmMgTBcQ eu388+OGPQWP7WdO3OTGl0hD/BSJbFWMpzu84nk82NyZN9/gT58F9CV6EdNWF1I0iSVc ATrg== 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:dkim-signature; bh=8H/tUs6jexV1FmhlZe3t10kL60wffM6RtCn29gBNiRM=; b=Xbbfxxzp4yz1uIMckYC5boSwzlVkfkJZq/KPr1x2cksdvn0Hq0aEBiShLSk7xSarFw CsIDtD/mFxLv3sTC+ZR4XvMdE9ZrvGkrqWarybY9+dzqqu46tJ4YucVTPNiPQSdaldNp rl1aNmD0DQjjP2t8c38tiv87DVwGxooRTEiLUxOfRFAC9ss4993BJIky4pOFVHP/ifhv fGNec3fYCNbYdaq5igZlWmOv4Qqvq+Mw+F3hoGXcOp+ACKe4lJmJTsyZ1yBRrUzGpecR CjmUgTGmsyOn/Jc60Mb9RXMzi7kia8MbCpXtVuEO1uLzSq0VCEyrooxX1j1lfmjdFCW1 In0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=hA0FGePG; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s41si22420422edm.412.2019.09.16.05.00.44; Mon, 16 Sep 2019 05:01:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=hA0FGePG; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731588AbfIPMAi (ORCPT + 99 others); Mon, 16 Sep 2019 08:00:38 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:41570 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731582AbfIPMAi (ORCPT ); Mon, 16 Sep 2019 08:00:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=8H/tUs6jexV1FmhlZe3t10kL60wffM6RtCn29gBNiRM=; b=hA0FGePG9IUbxZYSxbb5hQV8f rqpJpElyjXJjIu6XUz4ev/W93AtWAbBFev95HuRcTu0e5tN2TnTmpnY/MZVr1oUPaPD4N2kJHNx7x yr8p7YTOOIgJSJP0XaixoVJTHqnDOvQT6cL1nRQ7lq6uGFtig1oCyAQz2OVUeIYg5jRcD0sxabKBo 9iS1RUQwXxbodveiS4t/RITCaCdBiLQx+s5EcZBTLELktEQs8fqQLBsteKOpfz8gl84nNTZtVNxOY JA9h3qTpeH8wZWnNMY0k64Dc65o3PKkEkiwjTyNbGcI8SYfNdTI9ACglUDsCS7vg8M09uWS93skkR JcG2EOs+g==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.2 #3 (Red Hat Linux)) id 1i9pgG-0002cK-48; Mon, 16 Sep 2019 12:00:32 +0000 Date: Mon, 16 Sep 2019 05:00:32 -0700 From: Christoph Hellwig To: Matthew Bobrowski Cc: tytso@mit.edu, jack@suse.cz, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, david@fromorbit.com, hch@infradead.org, darrick.wong@oracle.com Subject: Re: [PATCH v3 1/6] ext4: introduce direct IO read path using iomap infrastructure Message-ID: <20190916120032.GA4005@infradead.org> References: <532d8deae8e522a27539470457eec6b1a5683127.1568282664.git.mbobrowski@mbobrowski.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <532d8deae8e522a27539470457eec6b1a5683127.1568282664.git.mbobrowski@mbobrowski.org> User-Agent: Mutt/1.12.1 (2019-06-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Sep 12, 2019 at 09:03:44PM +1000, Matthew Bobrowski wrote: > +static bool ext4_dio_checks(struct inode *inode) > +{ > +#if IS_ENABLED(CONFIG_FS_ENCRYPTION) > + if (IS_ENCRYPTED(inode)) > + return false; > +#endif > + if (ext4_should_journal_data(inode)) > + return false; > + if (ext4_has_inline_data(inode)) > + return false; > + return true; Shouldn't this function be called ext4_dio_supported or similar? Also bonus points of adding a patch that defines a IS_ENCRYPTED stub for !CONFIG_FS_ENCRYPTION to make this a little cleaner. Also the iomap direct I/O code supports inline data, so the above might not be required (at least with small updates elsewhere).