On Tue, 15 Oct 2024 at 17:32, Amir Goldstein <amir73il@xxxxxxxxx> wrote: > If this cleanup is acceptable then perhaps squash it with the above commit? I didn't want to do that, because for the backport your version is the simplest and easiest to review. > This seems wrong to me, that the callback gets an iocb > that was not initialized by the caller of backing_file_*(). That's only true for backing_file_splice_write(). Would oassing an iocb into that function fix your concern? > It seems better if the callback would get the backing_file_ctx. > We could copy the pos to this ctx if you think this is better. > > OTOH, ->user_file pretty much belongs to backing_file_ctx, > even if only used in the io callbacks. I don't like having user_file in there, because it's redundant. ->user_file and iocb->ki_filp *must* be the same, and I don't see how passing it as an opaque thing back to ->end_write() would make it any better. Thanks, Miklos