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 Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux