Re: [RFC PATCH] backing-file: clean up the API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux