Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp872638ybl; Tue, 13 Aug 2019 04:04:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqwuJuMZkjY3BVdJ4IY/cM5qK42+uAm+2VVdnyg1pPlwAwm92fZgrtJ/MVChtO69SayuNknw X-Received: by 2002:a17:90a:bb92:: with SMTP id v18mr1710168pjr.78.1565694284953; Tue, 13 Aug 2019 04:04:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565694284; cv=none; d=google.com; s=arc-20160816; b=mfoY4g5LoqpSl8sdaywvp8c+aEF6B/qCaOykY/9SJ71yeFwYK/T9K3i90GM2+DoWqO xrgfUP23BAVBYknva/DIMZu1buvBEoah/qJR+cVSFMdTrLIWE0AoN6u9plTB1dO/nZ6m 9Ym10pVnLBGgzPm7N3ev268Yu9LgK2A6SwqXUvzCGH//78OoXT1K/scN5s+/Wpf6JlHf zS8QGfieeHZ2xOlaPHROjGwIf1Gtat95rUIIvb+nFinF65yzI79B56VzOX5Q1SP2sobQ WLJFiELZOV5P3SCx/xDL7rlSMCyzlvNsGFE27gatlMbGV4QMPySr8XvrJqYqTRhm4yfX nIzQ== 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=jjB206979c1t5Aiv5jH/wcWJCEjp+cFnx77OyeBUdZ0=; b=cmWMf3hVVXuHy51pfiNFpaGFEJ+6pmpUwvZ11U8sZ3s7jSY7ijp5Qi12Ka4cdYt/ts CiOmpHjJ/qzbFT9CQvpc0VQYWqd0N5wINE9/n65Mzlw06E3VcFijAiM2i1vA1UM27cWe ybViBSPNuH+lntYHxmvMO21sPidd/wV2Ke3DQFI8/Ti8nZMjASCEyLdq74xYqA1RIYBe 2tto6m4An4E6ygIXPVuMQX5cuNs2uOJaQif//qrKB8uxst2Xm08/bgnb09dk7ztERAvc 455XOSd3ZyKCF/x3Uco06DrcLURw+yNse0rCrcoZnkGGMNWahjCvU8lijJMr7k1aNlEP StgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mbobrowski-org.20150623.gappssmtp.com header.s=20150623 header.b="d/gIWMLw"; 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 v20si770420pjn.27.2019.08.13.04.04.25; Tue, 13 Aug 2019 04:04:44 -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="d/gIWMLw"; 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 S1727540AbfHMKp4 (ORCPT + 99 others); Tue, 13 Aug 2019 06:45:56 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:32998 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727429AbfHMKp4 (ORCPT ); Tue, 13 Aug 2019 06:45:56 -0400 Received: by mail-pf1-f194.google.com with SMTP id g2so51386593pfq.0 for ; Tue, 13 Aug 2019 03:45:55 -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=jjB206979c1t5Aiv5jH/wcWJCEjp+cFnx77OyeBUdZ0=; b=d/gIWMLwwoUXaYpb/E6DOn4+TE5wubW1b25dOF+D/LiXdjIkbRx2vNN2BGxhSD5rL8 4T0cA05T1v2js/5jxD9Vi1JLzusSN9SpFnUO0fh9PakAmaugfWfikdQNuu/MYZs/1pKy m1RKflCXcnVSGb8x/SvQ3ijSxGD8ddn+q4zvQkIVpv+/g3HET3Q0K6QPmbsrUnrsqU/s vZtwJr/bhAAXpcBYTKfLi0DSubYnZ99FzFa4AtMWrC9Uak8zWDFrmXTuRAtakhjoitPm 1WQSETa05RULq0o1GN/14CRq9AVS+2kAKeoBPotzlvxtPCvfDOmI6jhddVjON1Zl4uYk 213w== 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=jjB206979c1t5Aiv5jH/wcWJCEjp+cFnx77OyeBUdZ0=; b=rf+ZQS+Q1dk6xTBF86AkKb9Vi8YKPzeV88inYCV6j9L2cZXJMQymKyQ5ILmU27+E33 qXBeuSoxMWVR5cLztxhjZ0Q1FMv/ZsF+Z/n3LrtLIDes7k+CmUul2iCZg3HR+4ajU2Ko 7V4qMrYtQKx2ZLkPBB0KfIBsogLpOyr8CLsq3k0CNZsd6ErB/M4/w6WmoKN0ZMiZ8zqj DcRCGavza6IPEZeUy91u7gmgTgUgfzsAkNKqmPFf1EuPoRZCrAr0CU/oqWhB/lVO7Cuf I+JGv7ArbOGzBDIzRDpAczicjrIUPTkYXR16x8/dQqR4x4Lz3njQte+Byg/v5V9/WBi/ y7yw== X-Gm-Message-State: APjAAAX5QZhzy8lNklpvgIkeZy60jT7AOLAaa7B/YSAeGWVx6dU1MkZA HoHkwoaLCM/mU2lWA7RV35Ek X-Received: by 2002:a17:90a:800a:: with SMTP id b10mr1566111pjn.23.1565693155216; Tue, 13 Aug 2019 03:45:55 -0700 (PDT) Received: from poseidon.bobrowski.net ([114.78.226.167]) by smtp.gmail.com with ESMTPSA id w129sm9904080pfd.89.2019.08.13.03.45.51 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 13 Aug 2019 03:45:54 -0700 (PDT) Date: Tue, 13 Aug 2019 20:45:48 +1000 From: Matthew Bobrowski To: Matthew Wilcox Cc: Christoph Hellwig , 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: <20190813104547.GA3911@poseidon.bobrowski.net> References: <3e83a70c4442c6aeb15b7913c39f853e7386a3c3.1565609891.git.mbobrowski@mbobrowski.org> <20190812171835.GB24564@infradead.org> <20190812201735.GA5307@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190812201735.GA5307@bombadil.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, Aug 12, 2019 at 01:17:35PM -0700, Matthew Wilcox wrote: > 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 Ah, clever - I like it! I actually didn't see this and thank you for highlighting. I guess I will be dropping the CONFIG_FS_DAX statement here... --M