Re: [PATCH v4 1/2] fs/aio: Restrict kiocb_set_cancel_fn() to I/O submitted via libaio

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

 



On 3/4/24 12:43 PM, Bart Van Assche wrote:
>> I'm also wondering why "ignore" is the right fix.  The USB gadget driver sees
>> that it has asynchronous I/O (kiocb::ki_complete != NULL) and then tries to set
>> a cancellation function.  What is the expected behavior when the I/O is owned by
>> io_uring?  Should it perhaps call into io_uring to set a cancellation function
>> with io_uring?  Or is the concept of cancellation functions indeed specific to
>> legacy AIO, and nothing should be done with io_uring I/O?
> 
> As far as I know no Linux user space interface for submitting I/O
> supports cancellation of read or write requests other than the AIO
> io_cancel() system call.

Not true, see previous reply (on both points in this email). The kernel
in general does not support cancelation of regular file/storage IO that
has submitted. That includes aio. There are many reasons for this.

For anything but that, you can most certainly cancel inflight IO with
io_uring, be it to a socket, pipe, whatever.

The problem here isn't that only aio supports cancelations, it's that
the code to do so is a bad hack.

-- 
Jens Axboe





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux