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

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

 



On Tue, Oct 15, 2024 at 5:49 PM Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
>
> 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 passing an
> iocb into that function fix your concern?
>

I suppose that would be better, only then passing iocb and a separate
ppos would be weird, or did you have something else in mind?

But I think that if we aim for a cleaner interface then the arguments of
backing_file_splice_{read,write}() should be similar and so should the
arguments of ->{end_write,access}(), so we should change
->access(file *) to ->end_read(iocb *)

This way we could call fuse_read_update_size() or something
from ->end_read() if we wanted to.

Thanks,
Amir.





[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