fcntl.2: More fixes to Jens Axboe's text on read/write hints

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2017-08-28 22:57:55 +02:00
parent b9ef608731
commit dfea9e6262
1 changed files with 12 additions and 7 deletions

View File

@ -1498,16 +1498,19 @@ all outstanding writes will be discarded.
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
.BR open (2)
for an explanation of open file desriptions.)
In this context, the term "write lifetime" means
the expected time the data will live on media, before
being overwritten or erased.
.PP
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
.\" FIXME What are "I/O classes"?
in arbitrary ways, so long as the hints are used consistently.
.PP
The following operations can be applied to the file descriptor,
@ -1530,12 +1533,14 @@ the open file description referred to by
.TP
.BR F_SET_FILE_RW_HINT " (\fIuint64_t\fP; since Linux 4.13)"
Sets the read/write hint value associated with the open file description
referred to by the file descriptor.
referred to by
.IR fd .
.PP
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.
.PP
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:
hints are valid since Linux 4.13:
.TP
.BR RWH_WRITE_LIFE_NOT_SET
No specific hint has been set.
@ -1566,8 +1571,8 @@ is expected to have a lifetime longer than
data written with
.BR RWH_WRITE_LIFE_LONG .
.PP
All the write specific hints are relative to each other, and no individual
absolute meaning should be attributed to them.
All the write-specific hints are relative to each other,
and no individual absolute meaning should be attributed to them.
.SH RETURN VALUE
For a successful call, the return value depends on the operation:
.TP 0.9i