aio: implement IOCB_CMD_POLL
authorChristoph Hellwig <hch@lst.de>
Tue, 20 Mar 2018 15:34:36 +0000 (16:34 +0100)
committerChristoph Hellwig <hch@lst.de>
Sat, 26 May 2018 07:16:44 +0000 (09:16 +0200)
commit2c14fa838cbefc23cf1c73ca167ed85b274b2913
tree23ba97edd9f681ea97850b7c8f56f9048c8ff397
parent888933f8fdf06ecbd5a476b312a37176ab29fb5e
aio: implement IOCB_CMD_POLL

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 this interface always works
in one shot mode, that is once the iocb is completed, it will have to be
resubmitted.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/aio.c
include/uapi/linux/aio_abi.h