aio: implement IOCB_CMD_POLL
authorChristoph Hellwig <hch@lst.de>
Mon, 16 Jul 2018 07:08:20 +0000 (09:08 +0200)
committerChristoph Hellwig <hch@lst.de>
Mon, 6 Aug 2018 08:24:33 +0000 (10:24 +0200)
commitbfe4037e722ec672c9dafd5730d9132afeeb76e9
tree3c4cda487ec44b9fdb91eebebd5e2f0e9cbc665b
parent9018ccc453af063d16b3b6b5dfa2ad0635390371
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>
Tested-by: Avi Kivity <avi@scylladb.com>
fs/aio.c
include/uapi/linux/aio_abi.h