fs: add fcntl() interface for setting/getting write life time hints
authorJens Axboe <axboe@kernel.dk>
Thu, 15 Jun 2017 16:30:27 +0000 (10:30 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 15 Jun 2017 16:30:27 +0000 (10:30 -0600)
commit1bdf52b7a2e549b1a651de9594eeb568cc0ce3fe
tree3f3a4ac98ca73a5f1b065d60f890682f9465b200
parentb22d3473cbd9219323a6cc0d27ec2973a03a5f49
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_WRITE_LIFE Returns one of the valid type of write hints,
like WRITE_HINT_MEDIUM.

F_SET_WRITE_LIFE Pass in a WRITE_HINT_* type to set the
write life time hint for this file/inode.
Returns 0 on succes, -1 otherwise.

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