mirror of https://github.com/mkerrisk/man-pages
fcntl.2: Describe the set/get write hints commands that are added in Linux 4.13
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
a40d006b5d
commit
580082a186
58
man2/fcntl.2
58
man2/fcntl.2
|
@ -5,6 +5,7 @@
|
|||
.\" and Copyright (C) 2002-2010, 2014 Michael Kerrisk;
|
||||
.\" and Copyright (C) 2014 Jeff Layton
|
||||
.\" and Copyright (C) 2014 David Herrmann
|
||||
.\" and Copyright (C) 2017 Jens Axboe
|
||||
.\"
|
||||
.\" %%%LICENSE_START(VERBATIM)
|
||||
.\" Permission is granted to make and distribute verbatim copies of this
|
||||
|
@ -61,6 +62,8 @@
|
|||
.\" Document F_SETPIPE_SZ and F_GETPIPE_SZ.
|
||||
.\" 2014-07-08, David Herrmann <dh.herrmann@gmail.com>
|
||||
.\" Document F_ADD_SEALS and F_GET_SEALS
|
||||
.\" 2017-06-26, Jens Axboe <axboe@kernel.dk>
|
||||
.\" Document F_{GET,SET}_RW_HINT and F_{GET,SET}_FILE_RW_HINT
|
||||
.\"
|
||||
.TH FCNTL 2 2017-05-03 "Linux" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
|
@ -1490,6 +1493,61 @@ Furthermore, if there are any asynchronous I/O operations
|
|||
.RB ( io_submit (2))
|
||||
pending on the file,
|
||||
all outstanding writes will be discarded.
|
||||
.SS File read/write hints
|
||||
Write life time hints can be used to inform the kernel about the relative
|
||||
expected life time of writes on a given inode or file. An application may
|
||||
use this interface for separating writes into different write classes,
|
||||
so that multiple users or applications running on a single storage back-end
|
||||
can aggregate their IO patterns in a consistent manner. However, there are
|
||||
no functional semantics implied by these flags, and different IO classes
|
||||
can use the write life time hints in arbitrary ways so long as they are used
|
||||
consistently.
|
||||
.TP
|
||||
.BR F_GET_RW_HINT " (\fIuint64_t\fP; since Linux 4.13)"
|
||||
Returns the value of the read/write hint associated with the underlying inode
|
||||
for the file descriptor.
|
||||
.TP
|
||||
.BR F_SET_RW_HINT " (\fIuint64_t\fP; since Linux 4.13)"
|
||||
Sets the read/write hint value associated with the underlying inode for the
|
||||
file descriptor.
|
||||
.TP
|
||||
.BR F_GET_FILE_RW_HINT " (\fIuint64_t\fP; since Linux 4.13)"
|
||||
Returns the value of the read/write hint associated with the file descriptor.
|
||||
.TP
|
||||
.BR F_SET_FILE_RW_HINT " (\fIuint64_t\fP; since Linux 4.13)"
|
||||
Sets the read/write hint value associated with the file descriptor.
|
||||
.P
|
||||
If a given file descriptor 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 valid since kernel 4.13:
|
||||
.TP
|
||||
.BR RWH_WRITE_LIFE_NOT_SET
|
||||
No specific hint has been set. This is the default value.
|
||||
.TP
|
||||
.BR RWH_WRITE_LIFE_NONE
|
||||
No specific write life time is associated with this file or inode.
|
||||
.TP
|
||||
.BR RWH_WRITE_LIFE_SHORT
|
||||
Data written to this file or inode is expected to have a short life time.
|
||||
.TP
|
||||
.BR RWH_WRITE_LIFE_MEDIUM
|
||||
Data written to this file or inode is expected to have a life time longer than
|
||||
data written with
|
||||
.BR RWH_WRITE_LIFE_SHORT .
|
||||
.TP
|
||||
.BR RWH_WRITE_LIFE_LONG
|
||||
Data written to this file or inode is expected to have a life time longer than
|
||||
data written with
|
||||
.BR RWH_WRITE_LIFE_MEDIUM .
|
||||
.TP
|
||||
.BR RWH_WRITE_LIFE_EXTREME
|
||||
Data written to this file or inode is expected to have a life time longer than
|
||||
data written with
|
||||
.BR RWH_WRITE_LIFE_LONG .
|
||||
.P
|
||||
All the write specific hints are relative to each other, and no individual
|
||||
absolute meaning should be attributed to them.
|
||||
.P
|
||||
.SH RETURN VALUE
|
||||
For a successful call, the return value depends on the operation:
|
||||
.TP 0.9i
|
||||
|
|
Loading…
Reference in New Issue