Re: [PATCH] fs: kill unused ret2 argument from iocb->ki_complete()

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

 



On Wed, 20 Oct 2021 19:49:07 +0200
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> 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.

[1] https://github.com/aosp-mirror/platform_system_core/blob/34a0e57a257f0081c672c9be0e87230762e677ca/adb/daemon/usb.cpp#L527



[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