From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from verein.lst.de ([213.95.11.211]:40399 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752102AbeEOH1M (ORCPT ); Tue, 15 May 2018 03:27:12 -0400 Date: Tue, 15 May 2018 09:31:29 +0200 From: Christoph Hellwig To: Andreas Gruenbacher Cc: cluster-devel@redhat.com, Christoph Hellwig , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v4 09/11] gfs2: iomap direct I/O support Message-ID: <20180515073129.GB23384@lst.de> References: <20180514153624.29598-1-agruenba@redhat.com> <20180514153624.29598-10-agruenba@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180514153624.29598-10-agruenba@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, May 14, 2018 at 05:36:22PM +0200, Andreas Gruenbacher wrote: > With that, the direct_IO address space operation can be all but > eliminated: only a dummy remains which indicates that the filesystem > supports direct I/O. And that dummy can be replaced with the generic noop_direct_IO helper. > + ret = filemap_write_and_wait_range(mapping, lstart, end); > + if (ret) > + goto out; We already do this call in the common code. > + if (iov_iter_rw(from) == WRITE) > + truncate_inode_pages_range(mapping, lstart, end); Why do you need the truncate_inode_pages_range call here instead of invalidate_inode_pages2_range that everyone else uses and that the iomap code already does for you?