Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp143454ybl; Mon, 12 Aug 2019 13:19:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjVa4tkfGLUUWON0NelQpDm9n5nvWbWxY38T1TNBnkC+UHiMDUMQq9z2c5VUxfxLgV7WN6 X-Received: by 2002:a17:90a:8985:: with SMTP id v5mr947451pjn.136.1565641143519; Mon, 12 Aug 2019 13:19:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565641143; cv=none; d=google.com; s=arc-20160816; b=KKe9/wUN3P0OoobNsccu+98kPgYKIEwZbObdwWGsqTFJD61tvuMWyApJQdfjTGjXCx 0JuNL/yfY4mup9430v0WakTgl7vJMrfeV8BeKl8bWdiQJYAAXY9/HS3oJg/bE69MIMEw ZeYdc7WA8Q8oQp2haEKiqjocKBaDviNshp/R4JKUPfDs2Vb2BBSAypBWHsJRTanhs/6X t1KXb02euxBvXsT922vMr+SonRhjXBumcFAQlK7fDe4accglLfvJ3MJaldyVM6gPoL3K VK9MJUmhciNnQyGAdtZKo9Dexc90dbi1esr3F/qu0NhJjS0Vc72ALvCqUeIH8nWrbQNm HXPg== 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=ZEYyxHxPiniKVYrkg5s9QOF3kwvVsp4P0LdTV42X/to=; b=MnPgzgL6Q7QEYeEO3M4kplsArz9wE3+lcvKTqvcwvjH8F/EVQf4bVqyRbRyJuTAj+6 ZLuz2JV17Ul05ox9RAgtgf0aTCAaS7+YBLevS1hyta3Fgt9LSUb/GBXVsv2FONaqW0+a 1a/t3x7CkQrIUvLl16hw9CR+jq77YJccisrTaKC3y1BH8C0e9qACnG86My7qeqNa0yuk 2naGr+65ZTUR65dhelyxn2bnH7N3l7ard2dTy0VZt0isVuen5B6i9E7ZIRux7U23N0qD V3UrdTdd3CP/LiklPwcqKw5zYSdP42ou0Iy+Goek/HJs803YaJQAURYVrvZ5lVtEi52a vVSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=p4AjsOCD; 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 d12si60190368pla.121.2019.08.12.13.18.40; Mon, 12 Aug 2019 13:19:03 -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=p4AjsOCD; 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 S1727239AbfHLURi (ORCPT + 99 others); Mon, 12 Aug 2019 16:17:38 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:35494 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726910AbfHLURh (ORCPT ); Mon, 12 Aug 2019 16:17:37 -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=ZEYyxHxPiniKVYrkg5s9QOF3kwvVsp4P0LdTV42X/to=; b=p4AjsOCDdNvgOr5k63rESQxrn EWwH/9D2VCyY4etgrCL8qPwf0XRThDnf4f1xlmrNDYv4+btUbGBMzeFBCmOJ0O5h4A5nxH1sqxf+H hENiXT+Jmp+eN38WAk5dbLGvMN0ZCEDQKuZRtwzKFdpxYvokfLYCop6g2VUrkWzH1/s0cLNz+/PzH emD6TBkoHZmG61uLp4zbvCFCRPmdByTIgfw0hsBD9q5aPK8k32Jq9nX4PVF2347TaKSNFr0r0nEYU Ow3o8QFM6ncWQDoQG+yL/BYhYJL59YivKO4Pe4mMlOmejJP6Ob5dy2mNHEsHANH6YbLjbyk2Ngj/D zE8y6ul3g==; Received: from willy by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1hxGl5-0003dm-O8; Mon, 12 Aug 2019 20:17:35 +0000 Date: Mon, 12 Aug 2019 13:17:35 -0700 From: Matthew Wilcox To: Christoph Hellwig Cc: Matthew Bobrowski , linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, jack@suse.cz, tytso@mit.edu, riteshh@linux.ibm.com Subject: Re: [PATCH 1/5] ext4: introduce direct IO read code path using iomap infrastructure Message-ID: <20190812201735.GA5307@bombadil.infradead.org> References: <3e83a70c4442c6aeb15b7913c39f853e7386a3c3.1565609891.git.mbobrowski@mbobrowski.org> <20190812171835.GB24564@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190812171835.GB24564@infradead.org> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon, Aug 12, 2019 at 10:18:35AM -0700, Christoph Hellwig wrote: > > return -EIO; > > > > if (!iov_iter_count(to)) > > return 0; /* skip atime */ > > > > #ifdef CONFIG_FS_DAX > > - if (IS_DAX(file_inode(iocb->ki_filp))) > > + if (IS_DAX(inode)) > > return ext4_dax_read_iter(iocb, to); > > #endif > > Same here. It doesn't even need IS_ENABLED. include/linux/fs.h:#define IS_DAX(inode) ((inode)->i_flags & S_DAX) #ifdef CONFIG_FS_DAX #define S_DAX 8192 /* Direct Access, avoiding the page cache */ #else #define S_DAX 0 /* Make all the DAX code disappear */ #endif