F_GET_RW_HINT, F_SET_RW_HINT, F_GET_FILE_RW_HINT,
- Provided by: manpages-dev (Version: 6.17-1)
- Source: manpages
- Report a bug
Standard C library (libc, -lc)
#include <fcntl.h>
int fcntl(int fd, F_GET_RW_HINT, uint64_t *arg); int fcntl(int fd, F_SET_RW_HINT, uint64_t *arg); int fcntl(int fd, F_GET_FILE_RW_HINT, uint64_t *arg); int fcntl(int fd, F_GET_FILE_RW_HINT, uint64_t *arg);
Write lifetime hints can be used to inform the kernel about the relative expected lifetime of writes on a given inode or via a particular open file description. (See open(2) for an explanation of open file descriptions.) In this context, the term "write lifetime" means the expected time the data will live on media, before being overwritten or erased.
An application may use the different hint values specified below to separate writes into different write classes, so that multiple users or applications running on a single storage back-end can aggregate their I/O patterns in a consistent manner. However, there are no functional semantics implied by these flags, and different I/O classes can use the write lifetime hints in arbitrary ways, so long as the hints are used consistently.
The following operations can be applied to the file descriptor, fd:
If an open file description has not been assigned a read/write hint, then it shall use the value assigned to the inode, if any.
The following read/write hints are supported:
All the write-specific hints are relative to each other, and no individual absolute meaning should be attributed to them.
Zero.
On error, -1 is returned, and errno is set to indicate the error.
See fcntl(2).
Linux.
Linux 4.13.