From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Date: Mon, 4 Jun 2018 14:52:27 +0200 Subject: [Cluster-devel] [PATCH v7 12/12] iomap: Put struct iomap_ops into struct iomap In-Reply-To: <20180604123729.23414-13-agruenba@redhat.com> References: <20180604123729.23414-1-agruenba@redhat.com> <20180604123729.23414-13-agruenba@redhat.com> Message-ID: <20180604125227.GC30780@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 Mon, Jun 04, 2018 at 02:37:29PM +0200, Andreas Gruenbacher wrote: > We need access to the struct iomap_ops in iomap_write_end to call the > (optional) page_write_end hook, so instead of passing the operators to > iomap_write_end differently depending on the code path, add an ops field > to struct iomap. I don't really like this. We already pass the iomap_ops to the function we call from iomap.c, and in fact ->iomap_begin is called through the ops. But what we could do is to move the page_write_end callback out of iomap_ops and just attached it to the iomap, especially given that it isn't really as generic as the other ops. Can't say I like the implications of this callback in general, but the use case is real, so..