From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Date: Wed, 30 May 2018 11:57:36 +0200 Subject: [Cluster-devel] [PATCH v5 14/14] gfs2: Handle stuffed files in iomap_{begin, end} In-Reply-To: <20180530094842.13559-15-agruenba@redhat.com> References: <20180530094842.13559-1-agruenba@redhat.com> <20180530094842.13559-15-agruenba@redhat.com> Message-ID: <20180530095736.GA31068@lst.de> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit > + if (gfs2_is_stuffed(ip)) { > + unstuff = pos + length > gfs2_max_stuffed_size(ip); > + > + if (!unstuff) { > + iomap->page = grab_cache_page_write_begin( > + inode->i_mapping, 0, flags); > + ret = -ENOMEM; > + if (!iomap->page) > + goto out; > + > + if (!PageUptodate(iomap->page)) { > + ret = stuffed_readpage(ip, iomap->page); > + if (ret) > + goto out; > + } > + } > + } grab_cache_page_write_begin needs to remain in iomap. Please just set up a pointer for later copying here. This will be important to support e.g. iomap_readpage(s) and to easily support direct I/O from inline data (just copy to/from the stuffed data pointer in iomap).