From: Jens Axboe <axboe@kernel.dk>
To: John Keeping <john@metanate.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, Christoph Hellwig <hch@infradead.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: [PATCH] fs: kill unused ret2 argument from iocb->ki_complete()
Date: Fri, 22 Oct 2021 09:44:32 -0600 [thread overview]
Message-ID: <e39e7f45-1c1e-a9bb-b413-1dfc21b1b20f@kernel.dk> (raw)
In-Reply-To: <20211021174021.273c82b1.john@metanate.com>
On 10/21/21 10:40 AM, John Keeping wrote:
> On Wed, 20 Oct 2021 19:49:07 +0200
> Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
>
>> On Wed, Oct 20, 2021 at 11:35:27AM -0600, Jens Axboe wrote:
>>> On 10/20/21 11:30 AM, Christoph Hellwig wrote:
>>>> On Wed, Oct 20, 2021 at 10:49:07AM -0600, Jens Axboe wrote:
>>>>> It's not used for anything, and we're wasting time passing in zeroes
>>>>> where we could just ignore it instead. Update all ki_complete users in
>>>>> the kernel to drop that last argument.
>>>>>
>>>>> The exception is the USB gadget code, which passes in non-zero. But
>>>>> since nobody every looks at ret2, it's still pointless.
>>>>
>>>> Yes, the USB gadget passes non-zero, and aio passes that on to
>>>> userspace. So this is an ABI change. Does it actually matter?
>>>> I don't know, but you could CC the relevant maintainers and list
>>>> to try to figure that out.
>>>
>>> True, guess it does go out to userspace. Greg, is anyone using
>>> it on the userspace side?
>>
>> I really do not know (adding linux-usb@vger) My interactions with the
>> gadget code have not been through the aio api, thankfully :)
>>
>> Odds are it's fine, I think that something had to be passed in there so
>> that was chosen? If the aio code didn't do anything with it, I can't
>> see where the gadget code gets it back at anywhere, but I might be
>> looking in the wrong place.
>>
>> Anyone else here know?
>
> I really doubt anyone uses io_event::res2 with FunctionFS gadgets. The
> examples in tools/usb/ffs-aio-example/ either check just "res" or ignore
> the status completely.
>
> The only other program I can find using aio FunctionFS is adbd which
> also checks res and ignores res2 [1]. Other examples I know of just use
> synchronous I/O.
So is there consensus on the USB side that we can just fill res2 with
zero? The single cases that does just do res == res2 puts the error
in res anyway, which is what you'd expect.
If so, then I do think that'd be cleaner than packing two values into
a u64.
--
Jens Axboe
next prev parent reply other threads:[~2021-10-22 15:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-20 16:49 [PATCH] fs: kill unused ret2 argument from iocb->ki_complete() Jens Axboe
2021-10-20 17:30 ` Christoph Hellwig
2021-10-20 17:35 ` Jens Axboe
2021-10-20 17:49 ` Greg Kroah-Hartman
2021-10-21 16:40 ` John Keeping
2021-10-21 16:56 ` Jens Axboe
2021-10-22 15:44 ` Jens Axboe [this message]
2021-10-23 9:09 ` Greg Kroah-Hartman
2021-10-23 14:01 ` Jens Axboe
2021-10-20 18:16 ` Jeff Moyer
2021-10-20 18:21 ` Jens Axboe
2021-10-20 18:37 ` Jeff Moyer
2021-10-20 18:41 ` Jens Axboe
2021-10-20 18:56 ` Jens Axboe
2021-10-20 19:11 ` Jeff Moyer
2021-10-20 19:12 ` Jens Axboe
2021-10-20 19:47 ` Jeff Moyer
2021-10-20 19:54 ` Jens Axboe
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=e39e7f45-1c1e-a9bb-b413-1dfc21b1b20f@kernel.dk \
--to=axboe@kernel.dk \
--cc=gregkh@linuxfoundation.org \
--cc=hch@infradead.org \
--cc=john@metanate.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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).