Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1295036ybg; Fri, 18 Oct 2019 15:22:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqy5JymhtNCHBQxBUw5Hi0N8n+9/B5AqAmqIHTz3MA4TyzDRr58z81OJTP8Ota3SeS6Hc1Pp X-Received: by 2002:a17:906:2961:: with SMTP id x1mr11040139ejd.91.1571437362925; Fri, 18 Oct 2019 15:22:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571437362; cv=none; d=google.com; s=arc-20160816; b=pCNHJvw2RajSqwdJsaJExPZ6VPR8Hcp23GiSGMbamtzmb6+qZDfx+l+EqLEUDJ77VG gh4zhrUhKsdABZo3uR80krLez93a3Sse5f1Nb9gOBfVpVH0G4Zq++HRi42EeV/ueNTqo RgXC1deXNgvNXtjOFGgn7qs9MN5LGj8y9Zu3UlFSrDdC6KvfsRvXsg9qgedKFHpT2iqD dD2tSbZvkWjtbhQ2zSbZAT+XWiiZjh9urGMjw3LZWeTNOA/bwD31+vNhV41n+rTjqPZo iMj7Dv2YcLUuPi2RLuCgkvi+3J3cVirg2K76WspbSb6WO/3uNvh/1TIbNDx55o2gYokF Yc9g== 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=98GpYLRwSkTQW+31mE56KMoWjsDPbX3fOPDTfwNIEJY=; b=niypScqZEMmqaPNLAnbyFZkRcQEhBUCkYjRyZTgBtcVHA692IXuB0NC2ekQSR2T5EI 3qOx3ywqFrnuomDY9HXJTwgDNgAy0EVwYV1wVJhAtKLgeihZ9rI2Zy9L4SiO/RF6vPZv kBaoMFXdkwiQsenOJm2cpJIbPa1yOwnj4+dMz3ckQuHBlFpJbiNQAoSVkFScwSVbztc3 GxI/YyUm/4lUEOse1EQhrxdSo+EI1bdakiUm5TNu0nvmty0cGyt0ZQQFg+Ek7BzSHF3b qgKiZeMXMmdSBH9cELQXggd9SmnOpZ2IqRldMSMpzCKYvzazG2dwqjvOSAPdnlOtdSOC ATxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mbobrowski-org.20150623.gappssmtp.com header.s=20150623 header.b=P9ne7A9V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 f17si4774492eda.232.2019.10.18.15.22.19; Fri, 18 Oct 2019 15:22:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=P9ne7A9V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2441712AbfJQXIW (ORCPT + 99 others); Thu, 17 Oct 2019 19:08:22 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:44405 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2441702AbfJQXIW (ORCPT ); Thu, 17 Oct 2019 19:08:22 -0400 Received: by mail-pg1-f196.google.com with SMTP id e10so2201381pgd.11 for ; Thu, 17 Oct 2019 16:08:22 -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=98GpYLRwSkTQW+31mE56KMoWjsDPbX3fOPDTfwNIEJY=; b=P9ne7A9VWvIgJ2CO0Eq3g3Kuwsg77OIPUU+GUMXqFkhK5opoPq3Il7YFz+76EO/J+t 7QHE4Aa6cQMU7X2JhpLe3yAyTAaLF5dtPVAkZa0M2g4Ixr6Usjl5mItPREAGWevki8rq ngIG77OZuG6GQMqfLAtfu/F/e9wekmOYLZQWeo38NfDgj/NkBIO4ScpZr00AYYlcZZC5 OKtHkwEQDctGBeSTwEH9caCaMmriRHAgWvOHonl9dKWoOkGJwRoKWfM4geEtbeDP/Ico tCrVeZ/0+dk1GqzmjU9kl/zbuu3nmGqOiLdOxNzZH49j0tNMfIHi9qcb5fo8To4wJQHP xRRg== 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=98GpYLRwSkTQW+31mE56KMoWjsDPbX3fOPDTfwNIEJY=; b=M/iXwADY9PBpx1yBCpcEWERAzrvuxZe5rqyknLE7J+e21G+z5LK5LkIQhnQ1B/97AK sgWpMdvMjhHky8qWurdM15rQ4l/eATB66ajaZxSo5ZloNz/KKDfpVWwc/zlYIuy6z8F6 12NsVBoRFdkxgjSK6d/lzuv9daDnuaP4ofg5UruqC15pajZa6rxPdgPWmu005eQsPoY0 +aO67WbLmFFVAaYlL/zvZdNwtBN8/SRjbk7X2pSdijYgTqyYMWO0AYZj4MZpW00xarWj W9NE4mZVc3jfItQibynDtNGLMIRkd/kyS9YLfmI1PubWTMZIJBrj7N9BngozQ/MsqC97 maJA== X-Gm-Message-State: APjAAAVDIoo6jzIXKi56IiDd9d+y5oksXCE0tWmwCEKzJXsP287ziBay 2FkxVdmy5G7gkZLEze8l2n3I X-Received: by 2002:a63:41c7:: with SMTP id o190mr6771050pga.6.1571353701420; Thu, 17 Oct 2019 16:08:21 -0700 (PDT) Received: from bobrowski ([110.232.114.101]) by smtp.gmail.com with ESMTPSA id t11sm3418848pjy.10.2019.10.17.16.08.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2019 16:08:20 -0700 (PDT) Date: Fri, 18 Oct 2019 10:08:14 +1100 From: Matthew Bobrowski To: Dave Chinner Cc: "Darrick J. Wong" , Christoph Hellwig , Damien Le Moal , Andreas Gruenbacher , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Dave Chinner Subject: Re: [PATCH 01/14] iomap: iomap that extends beyond EOF should be marked dirty Message-ID: <20191017230814.GB31874@bobrowski> References: <20191017175624.30305-1-hch@lst.de> <20191017175624.30305-2-hch@lst.de> <20191017183917.GL13108@magnolia> <20191017215613.GN16973@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191017215613.GN16973@dread.disaster.area> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 18, 2019 at 08:56:13AM +1100, Dave Chinner wrote: > On Thu, Oct 17, 2019 at 11:39:17AM -0700, Darrick J. Wong wrote: > > On Thu, Oct 17, 2019 at 07:56:11PM +0200, Christoph Hellwig wrote: > > > From: Dave Chinner > > > > > > When doing a direct IO that spans the current EOF, and there are > > > written blocks beyond EOF that extend beyond the current write, the > > > only metadata update that needs to be done is a file size extension. > > > > > > However, we don't mark such iomaps as IOMAP_F_DIRTY to indicate that > > > there is IO completion metadata updates required, and hence we may > > > fail to correctly sync file size extensions made in IO completion > > > when O_DSYNC writes are being used and the hardware supports FUA. > > > > > > Hence when setting IOMAP_F_DIRTY, we need to also take into account > > > whether the iomap spans the current EOF. If it does, then we need to > > > mark it dirty so that IO completion will call generic_write_sync() > > > to flush the inode size update to stable storage correctly. > > > > > > Signed-off-by: Dave Chinner > > > Signed-off-by: Christoph Hellwig > > > > Looks ok, but need fixes tag. Also, might it be wise to split off the > > ext4 section into a separate patch so that it can be backported > > separately? > > I 've done a bit more digging on this, and the ext4 part is not > needed for DAX as IOMAP_F_DIRTY is only used in the page fault path > and hence can't change the file size. As such, this only affects > direct IO. Hence the ext4 hunk can be added to the ext4 iomap-dio > patchset that is being developed rather than being in this patch. Noted, thanks Dave. I've incorporated the ext4 related change into my patch series. ----