mount_setattr.2: Rework the discussion of MOUNT_ATTR__ATIME

Phrases such as "In the new mount API" will date fast. Remove it.
Also:
* Make it clear that MOUNT_ATTR__ATIME expresses a bit field.
* Replace 'enum' with 'enumeration'.
* Clarify what is meant by "partially" set MOUNT_ATTR__ATIME.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2021-08-10 10:41:05 +02:00
parent 705bf534bb
commit d27bcddc11
1 changed files with 14 additions and 10 deletions

View File

@ -270,8 +270,11 @@ and is implied by the noatime setting.
All other access-time settings are mutually exclusive. All other access-time settings are mutually exclusive.
.TP .TP
.BR MOUNT_ATTR__ATIME " - changing access-time settings" .BR MOUNT_ATTR__ATIME " - changing access-time settings"
In the new mount API, the access-time values are an enum starting from 0. The access-time values listed below are an enumeration that
Even though they are an enum (in contrast to the other mount flags such as includes the value zero, expressed in the bits defined by the mask
.BR MOUNT_ATTR__ATIME .
Even though these bits are an enumeration
(in contrast to the other mount flags such as
.BR MOUNT_ATTR_NOEXEC ), .BR MOUNT_ATTR_NOEXEC ),
they are nonetheless passed in they are nonetheless passed in
.I attr_set .I attr_set
@ -282,12 +285,11 @@ for consistency with
which introduced this behavior. which introduced this behavior.
.IP .IP
Note that, Note that,
since access times are an enum since the access-time values are an enumeration rather than bit values,
not a bit map, a caller wanting to transition to a different access-time setting
users wanting to transition to a different access-time setting cannot simply cannot simply specify the access-time setting in
specify the access-time setting in .IR attr_set ,
.I attr_set but must also include
but must also set
.B MOUNT_ATTR__ATIME .B MOUNT_ATTR__ATIME
in the in the
.I attr_clr .I attr_clr
@ -295,8 +297,10 @@ field.
The kernel will verify that The kernel will verify that
.B MOUNT_ATTR__ATIME .B MOUNT_ATTR__ATIME
isn't partially set in isn't partially set in
.IR attr_clr , .IR attr_clr
and that (i.e., either all bits in the
.B MOUNT_ATTR__ATIME
bit field are either set or clear), and that
.I attr_set .I attr_set
doesn't have any access-time bits set if doesn't have any access-time bits set if
.B MOUNT_ATTR__ATIME .B MOUNT_ATTR__ATIME