fs: add an iopoll method to struct file_operations
authorChristoph Hellwig <hch@lst.de>
Thu, 22 Nov 2018 15:37:38 +0000 (16:37 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 4 Dec 2018 16:42:03 +0000 (09:42 -0700)
commitb963010d43bb2847591a927e2a1ff0246dec30f9
tree479282481fcdc6e5ca1034e7805841b158319296
parent154989e45fd8de9bfb52bbd6e5ea763e437e54c5
fs: add an iopoll method to struct file_operations

This new methods is used to explicitly poll for I/O completion for an
iocb.  It must be called for any iocb submitted asynchronously (that
is with a non-null ki_complete) which has the IOCB_HIPRI flag set.

The method is assisted by a new ki_cookie field in struct iocb to store
the polling cookie.

TODO: we can probably union ki_cookie with the existing hint and I/O
priority fields to avoid struct kiocb growth.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Documentation/filesystems/vfs.txt
include/linux/fs.h