Re: [Devel] [PATCH VZ9 3/3] fs/fuse: enhanced splice support

2024-01-18 Thread Kui Liu
On 9 Jan 2024, at 9:40 PM, Alexey Kuznetsov wrote: Unfortunately, existing support of splice in fuse is completely useless, it has many flaws, each of them is fatal, even taken separately. - it passes only single splice, which requires of user space to prepare one more splice to merge header.

Re: [Devel] [PATCH VZ9 3/3] fs/fuse: enhanced splice support

2024-01-18 Thread Alexey Kuznetsov
Hello! On Thu, Jan 18, 2024 at 4:38 PM Kui Liu code wrote: > Is this a mistake that the condition for kmalloc should be "nsplices > 8 * 4” > ? It should. Unfortunately, the mistake was in wrong direction, so that it had no chances to be noticed, thank you! :-) > Is it difficult to separate the

Re: [Devel] [PATCH VZ9 3/3] fs/fuse: enhanced splice support

2024-01-18 Thread Kui Liu
> On 18 Jan 2024, at 5:08 PM, Alexey Kuznetsov wrote: > >> Is it difficult to separate the verification of inputs, such as fds, size of >> src buffs against dest buffs etc, from the process of copying data? Similar >> to what’s been done in ‘copy_out_args()’. > > I am not sure I understand w

Re: [Devel] [PATCH VZ9 3/3] fs/fuse: enhanced splice support

2024-01-18 Thread Alexey Kuznetsov
Hello! > BTW I just found out there’s no fdput() in the error path. Indeed. Thanks! About suggestion, well, no. Not only this would be not simpler, it would be just wrong. All the checks and all the use must be done after fget before fput, otherwise user space can close the descriptor and even

Re: [Devel] [PATCH VZ9 3/3] fs/fuse: enhanced splice support

2024-01-18 Thread Kui Liu
> > About suggestion, well, no. Not only this would be not simpler, it > would be just wrong. > All the checks and all the use must be done after fget before fput, otherwise > user space can close the descriptor and even open something > else in another thread. > Yeah, I forgot about this con