Re: [PATCH 06/28] aio: implement IOCB_CMD_POLL

2018-03-23 Thread Christoph Hellwig
On Thu, Mar 22, 2018 at 06:16:53PM +, Al Viro wrote: > On Thu, Mar 22, 2018 at 06:24:10PM +0100, Christoph Hellwig wrote: > > > -static void aio_complete(struct aio_kiocb *iocb, long res, long res2) > > +static bool aio_complete(struct aio_kiocb *iocb, long res, long res2, > > + unsi

Re: [PATCH 06/28] aio: implement IOCB_CMD_POLL

2018-03-22 Thread Al Viro
On Thu, Mar 22, 2018 at 06:24:10PM +0100, Christoph Hellwig wrote: > -static void aio_complete(struct aio_kiocb *iocb, long res, long res2) > +static bool aio_complete(struct aio_kiocb *iocb, long res, long res2, > + unsigned complete_flags) Looks like all callers are following that w

Re: [PATCH 06/28] aio: implement IOCB_CMD_POLL

2018-03-22 Thread Christoph Hellwig
On Thu, Mar 22, 2018 at 04:52:55PM +, Al Viro wrote: > On Wed, Mar 21, 2018 at 08:40:10AM +0100, Christoph Hellwig wrote: > > Simple one-shot poll through the io_submit() interface. To poll for > > a file descriptor the application should submit an iocb of type > > IOCB_CMD_POLL. It will poll

Re: [PATCH 06/28] aio: implement IOCB_CMD_POLL

2018-03-22 Thread Al Viro
On Wed, Mar 21, 2018 at 08:40:10AM +0100, Christoph Hellwig wrote: > Simple one-shot poll through the io_submit() interface. To poll for > a file descriptor the application should submit an iocb of type > IOCB_CMD_POLL. It will poll the fd for the events specified in the > the first 32 bits of th

Re: [PATCH 06/28] aio: implement IOCB_CMD_POLL

2018-03-21 Thread Darrick J. Wong
On Wed, Mar 21, 2018 at 08:40:10AM +0100, Christoph Hellwig wrote: > Simple one-shot poll through the io_submit() interface. To poll for > a file descriptor the application should submit an iocb of type > IOCB_CMD_POLL. It will poll the fd for the events specified in the > the first 32 bits of th

Re: [PATCH 06/28] aio: implement IOCB_CMD_POLL

2018-03-21 Thread Greg KH
On Wed, Mar 21, 2018 at 08:40:10AM +0100, Christoph Hellwig wrote: > Simple one-shot poll through the io_submit() interface. To poll for > a file descriptor the application should submit an iocb of type > IOCB_CMD_POLL. It will poll the fd for the events specified in the > the first 32 bits of th

[PATCH 06/28] aio: implement IOCB_CMD_POLL

2018-03-21 Thread Christoph Hellwig
Simple one-shot poll through the io_submit() interface. To poll for a file descriptor the application should submit an iocb of type IOCB_CMD_POLL. It will poll the fd for the events specified in the the first 32 bits of the aio_buf field of the iocb. Unlike poll or epoll without EPOLLONESHOT thi