On Fri, Nov 16, 2018 at 04:55:42PM +0100, Christoph Hellwig wrote: > On Tue, Nov 06, 2018 at 09:52:03AM +0100, Carlos Maiolino wrote: > > Not really, because fiemap_extent_info has (had now) a userspace pointer, which > > isn't used in FIBMAP calls in later patches, so the idea of using callbacks > > started as a need to use different code workflow, depending on the user of (now > > deprecated) fiemap_extent_info > > Well, we could also change that member of fiemap_extent_info if we > really wanted to. Not sure that would be the better route, though. I think there are some downsides in keep using fiemap_extent_info. I'd rather prefer use this new fiemap_ctx, which we can use to embed most of the arguments needed for fiemap, like the flags which were passed separated. At all, most of the fields would fit either in fiemap_extent_info, or the new fiemap_ctx. I'd prefer the latter, due simplicity. We could probably simplify it using the void pointer directly into fiemap_extent_info and using flags to discern between user/kernel space pointer. But that would drop one of the goals of this patchset, which is adding a new and better interface for FIEMAP. Preferentially, I'd stick with fiemap_ctx. Cheers and thanks for the review -- Carlos