aio: utilize io_event->res2 for CQ ring
authorJens Axboe <axboe@kernel.dk>
Sat, 5 Jan 2019 05:18:24 +0000 (22:18 -0700)
committerJens Axboe <axboe@kernel.dk>
Sun, 6 Jan 2019 21:57:21 +0000 (14:57 -0700)
commita9c42c91b6e14df02e344f0385b7c4fdb9889999
tree5317adcb024054605421e9237d660e288c2a408b
parent541a919e90b44c8d7f4376dd6969ebddb7fe7091
aio: utilize io_event->res2 for CQ ring

We don't use this at all, grab it to provide hints about the data.
The first hint we add is IORING_RES2_CACHEHIT, whether a read was
served out of the page cache, or if it hit media. This is useful
for buffered aio, O_DIRECT reads would never have this set (for
obvious reasons).

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/aio.c
include/uapi/linux/aio_abi.h