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>
Thu, 3 Jan 2019 15:14:02 +0000 (08:14 -0700)
commit23b9c65df4b3f433722b372385de15d09e8bd5b8
tree9da1997f6870b697b81b66aaaa10606daec739ab
parent645ff1e8e704c4f33ab1fcd3c87f95cb9b6d7144
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