From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from verein.lst.de ([213.95.11.211]:49531 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1164466AbeE1M4C (ORCPT ); Mon, 28 May 2018 08:56:02 -0400 Date: Mon, 28 May 2018 15:02:06 +0200 From: Christoph Hellwig To: Andreas =?iso-8859-1?Q?Gr=FCnbacher?= Cc: Christoph Hellwig , Andreas Gruenbacher , Dave Chinner , cluster-devel , linux-fsdevel , Dave Chinner Subject: Re: [PATCH v4 06/11] iomap: Add write_{begin,end} iomap operations Message-ID: <20180528130206.GA14706@lst.de> References: <20180514153624.29598-1-agruenba@redhat.com> <20180514153624.29598-7-agruenba@redhat.com> <20180515011147.GF23861@dastard> <20180515072252.GA23202@lst.de> <20180518160458.GA3503@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, May 25, 2018 at 07:58:14PM +0200, Andreas Gr�nbacher wrote: > > The right way to deal with that is to make > > inline data an explicit iomap type (done in my next posting of the > > buffer head removal series), and then have iomap_begin find the data, > > kmap it and return it in the iomap, with iomap_end doing any fixups. > > I see what you mean. How would iomap_write_actor deal with > IOMAP_INLINE -- just skip iomap_write_begin and iomap_write_end and > grab the page from the iomap? I would add a data pointer to struct iomap and pass the data back from there. We'll still need most of iomap_write_begin / iomap_write_end, but just copy the data from the iomap instead of reading it from disk. Note that the block_write_begin code already handles that case for the get_blocks path.