From: Jens Axboe <axboe@kernel.dk>
To: Christian Brauner <brauner@kernel.org>
Cc: Bart Van Assche <bvanassche@acm.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Avi Kivity <avi@scylladb.com>,
Sandeep Dhavale <dhavale@google.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org
Subject: Re: [PATCH v2] fs, USB gadget: Rework kiocb cancellation
Date: Fri, 9 Feb 2024 11:12:59 -0700 [thread overview]
Message-ID: <9a7294ef-6812-43bb-af50-a2b4659f2d15@kernel.dk> (raw)
In-Reply-To: <20240209-katapultieren-lastkraftwagen-d28bbc0a92b2@brauner>
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
next prev parent reply other threads:[~2024-02-09 18:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-08 21:55 [PATCH v2] fs, USB gadget: Rework kiocb cancellation Bart Van Assche
2024-02-08 22:14 ` Jens Axboe
2024-02-08 22:41 ` Bart Van Assche
2024-02-08 23:05 ` Jens Axboe
2024-02-08 23:16 ` Jens Axboe
2024-02-09 9:34 ` Christian Brauner
2024-02-09 18:12 ` Jens Axboe [this message]
2024-02-12 19:28 ` Bart Van Assche
2024-02-13 21:01 ` Bart Van Assche
2024-02-16 15:00 ` Christian Brauner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9a7294ef-6812-43bb-af50-a2b4659f2d15@kernel.dk \
--to=axboe@kernel.dk \
--cc=avi@scylladb.com \
--cc=brauner@kernel.org \
--cc=bvanassche@acm.org \
--cc=dhavale@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).