Re: [PATCH v2] fs, USB gadget: Rework kiocb cancellation

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

 



On 2/9/24 2:34 AM, Christian Brauner wrote:
>> Why don't you just keep ki_cancel() and just change it to a void return
>> that takes an aio_kiocb? Then you don't need this odd switch, or adding
>> an opcode field just for this. That seems cleaner.
>>
>> Outside of these little nits, looks alright. I'd still love to kill the
>> silly cancel code just for the gadget bits, but that's for another day.
> 
> Well, I'd prefer to kill it if we can asap. Because then we can lose
> that annoying file_operations addition. That really rubs me the wrong way.

Greg, can you elaborate on how useful cancel is for gadgets? Is it one
of those things that was wired up "just because", or does it have
actually useful cases?

Because cancel, internally in aio, makes sense on eg a poll request. But
we don't need extra support for that, that's all internal to aio. It
doesn't make sense for O_DIRECT IO on a regular file, as there's no way
to cancel that anyway.

Reason I'm asking is that we have this broken cancel infrastructure that
we can either attempt to make work, at a cost of adding an operation to
the file_operations struct, or we can just get rid of it.

-- 
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