From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Date: Mon, 28 May 2018 15:02:06 +0200 Subject: [Cluster-devel] [PATCH v4 06/11] iomap: Add write_{begin, end} iomap operations In-Reply-To: References: <20180514153624.29598-1-agruenba@redhat.com> <20180514153624.29598-7-agruenba@redhat.com> <20180515011147.GF23861@dastard> <20180515072252.GA23202@lst.de> <20180518160458.GA3503@lst.de> Message-ID: <20180528130206.GA14706@lst.de> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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.