fs: add fcntl() interface for setting/getting write life time hints
authorJens Axboe <axboe@kernel.dk>
Fri, 16 Jun 2017 17:13:28 +0000 (11:13 -0600)
committerJens Axboe <axboe@fb.com>
Fri, 16 Jun 2017 17:19:58 +0000 (11:19 -0600)
commita573d601ccf2c83cdd7b4516d69d6dbe9c0f8723
tree11a2e03cb5dde7be30f0f35cc706a8c3803e6dea
parentf5e6efd9b52323aedabe5abad873ee3fa2e751d0
fs: add fcntl() interface for setting/getting write life time hints

We have a pwritev2(2) interface based on passing in flags. Add an
fcntl interface for querying these flags, and also for setting them
as well:

F_GET_RW_HINT Returns the read/write hint set. Right now it
will be one of the WRITE_LIFE_* values.

F_SET_RW_HINT Pass in rw_hint type to set the read/write hint.
Only WRITE_LIFE_* hints are currently supported.
Returns 0 on succes, -1 otherwise.

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