Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4057949ybe; Mon, 16 Sep 2019 06:08:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqzzCW6pcMfXBFuEwIB+9PN9MbPsar/N4o7L310YGM90Qr0pIhbzAaOsDHMhY3brEx/AAXqn X-Received: by 2002:a17:907:41e5:: with SMTP id nb5mr12828719ejb.91.1568639327876; Mon, 16 Sep 2019 06:08:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568639327; cv=none; d=google.com; s=arc-20160816; b=x8wEkPKt1k9Esc6boh4jAPiqitb1d0gjOU6+5V1u7D0NU04V4QKdpqwrzQ3QL+JDo2 sHvRTYeYbUI2W3bb3QpSH4yyNvJHMCjcppJ4A8ud2cywtH88yaLyieJkL5Vjic8X+cgY YAroz6OdTiSwWAAAGxwU36oqOO0oFdbTJIsFPw/Qh/0JKTV0pLPz88N9PKzEMDUz8p5P oZ4dOXic+ayZSaa9xjKWDg7euU3FdumpDLCiCOvMjlNjvfo3d4RLe+4dKVJWOcVWcSd+ D30FEOjnI2995KKDFTDqbpzcwhQqv5CPk48SgLPDVmd4RXSbezTcsX1dcJ9inyN1xaGW N5ww== 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=XBRZTGkG6F9z2g/QPkwkH5mhWZBFzDCgMo6crL6U7yo=; b=m3TjSLp2LcEx3hk5xi1wRSQWKwJeHWRcMZzhSHHDGoyym+PFg9KKz2QXfKoG23h+UH IEm9sLb86AnX3E+CBh0vX45Ndx2Kur+VuNml8smiY30f1cd8MRDCADvECBJURyfdJ/Ts 3KWk7wJXySaW87RJ/0E3V8PxEDHjufJxEUn7m0UZdQhsP8WhY/mw/QcZeLGWZgCq1w0D 4pwDis/sqJoipSWU2VMp01vDIrkBkSyqYJ0AvTT0R+lWvO8fehfqhhAE7X56VEMlPxR1 +yZ9tkqjE0Pn50CeLGyjqlzDbmekXyl3NUNp4UKg3cXZB3GfBTdVxNWKikzRMnImaIfD m/xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mbobrowski-org.20150623.gappssmtp.com header.s=20150623 header.b=ppo40voW; 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 j4si752896ejv.67.2019.09.16.06.08.12; Mon, 16 Sep 2019 06:08:47 -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=pass header.i=@mbobrowski-org.20150623.gappssmtp.com header.s=20150623 header.b=ppo40voW; 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 S1732950AbfIPNHm (ORCPT + 99 others); Mon, 16 Sep 2019 09:07:42 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:41076 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732852AbfIPNHm (ORCPT ); Mon, 16 Sep 2019 09:07:42 -0400 Received: by mail-pf1-f194.google.com with SMTP id q7so1431779pfh.8 for ; Mon, 16 Sep 2019 06:07:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mbobrowski-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XBRZTGkG6F9z2g/QPkwkH5mhWZBFzDCgMo6crL6U7yo=; b=ppo40voW+CoG9AVCAvDvAuDz2DDa2y31W/V6ZXaazTbrmlCci50pwAGGz/1Kv2EBdd sbDDvK7gLTkE1JMJUbGJAP0o+o9wBYx8SyOqB6fwXzFuCGLSsf11FdOzY3gYrwGHtMaB iIOFPQkebw1ade/WtANUphIS49oJ6omKLLCOMB0K4QhxiD2BzZaJKKIW3t+bZNKCF/EE axRVY9ZqRLm4rmTAFwzkYVv661DTlqPTasO+XKuJSPvVDWu1ul1F2OU1fg1nhT33OSyD aAS+Ej8aYxZIec5oyRejwFD2Nbfa8YGLrJLfYlEHXforlICwrl5ynMR62rm18txGimfG Z0jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=XBRZTGkG6F9z2g/QPkwkH5mhWZBFzDCgMo6crL6U7yo=; b=S7sBceVM8mXql0+gNWk6X6BsLIWJFouMUrs6Vk/giwtP6SfAw5YYzjZwa/yR0Uoywj /VmSb7dAeSp76cyeUJVZL/BlW16I/8ytzUy1yndKDL4Ig4dueXylUgLGj8Td2em8dhfl D+TLEqu0f6vDnQYvtkPiUqeqtbJTqWXvZWAIC4gsV/CiQODtzWo1wa0f8tdkjF6mIbi0 qVm05P4HyC0d4sDIKkQArB/CKfwVcICFoc2u00GNHXXttCuXjAf4HGcYQOCjCFnF/Ucf UuT78i5uxpYpaVwj3eKq/0sa2IIizavzArgSwY46Ne02Ky0mwtH0P9219FsEEUQHnnbO WZyg== X-Gm-Message-State: APjAAAWdn+6vF4bylRmctGz6lVeDnFS9/nBG4rTYhNO2X8J96FVLJzQf dERrsL5oeWR9Ks6fDS+zhqyVi5gzUIbg X-Received: by 2002:a17:90a:d356:: with SMTP id i22mr19690052pjx.24.1568639261615; Mon, 16 Sep 2019 06:07:41 -0700 (PDT) Received: from bobrowski ([110.232.114.101]) by smtp.gmail.com with ESMTPSA id e10sm59500188pfh.77.2019.09.16.06.07.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Sep 2019 06:07:40 -0700 (PDT) Date: Mon, 16 Sep 2019 23:07:35 +1000 From: Matthew Bobrowski To: Christoph Hellwig Cc: tytso@mit.edu, jack@suse.cz, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, david@fromorbit.com, darrick.wong@oracle.com Subject: Re: [PATCH v3 1/6] ext4: introduce direct IO read path using iomap infrastructure Message-ID: <20190916130735.GD4024@bobrowski> References: <532d8deae8e522a27539470457eec6b1a5683127.1568282664.git.mbobrowski@mbobrowski.org> <20190916120032.GA4005@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190916120032.GA4005@infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon, Sep 16, 2019 at 05:00:32AM -0700, Christoph Hellwig wrote: > 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? Yeah, let's run with your suggestion. I think 'ext4_dio_supported' reads far better than what I've named this helper. > Also bonus points of adding a patch that defines a IS_ENCRYPTED stub > for !CONFIG_FS_ENCRYPTION to make this a little cleaner. I like this idea and I will try to do this. > Also the iomap direct I/O code supports inline data, so the above > might not be required (at least with small updates elsewhere). I did see this, but to be perfectly honest I haven't looked at what needs to be done on the ext4 side of things to get it all plumbed up and working. I wanted to get clear of these main bits and revisit after the fact within a separate patch series. ----