-.Dd April 30, 2013
+.Dd February 11, 2019
.Dt getiopolicy_np 3
.Os
.Sh NAME
can be get or set for the given
.Fa scope .
.Pp
-The I/O type is specified in the argument
-.Fa iotype .
-The only currently supported I/O type is
-.Dv IOPOL_TYPE_DISK ,
-which can mean either the I/O policy for I/Os to local disks or to
-remote volumes.
-I/Os to local disks are I/Os sent to the media without going through a network,
-including I/Os to internal and external hard drives, optical media in internal
-and external drives, flash drives, floppy disks, ram disks, and mounted disk
-images which reside on these media.
-I/Os to remote volumes are I/Os that require network activity to complete the
-operation.
-This is currently only supported for remote volumes mounted by SMB or AFP.
-.Pp
The scope that the I/O policy takes effect is specified in the argument
.Fa scope
as follows:
.Fa policy
is an integer which contains the new I/O policy to be set for the given I/O
type and scope.
-.Fa Policy
-can have the following values:
+.Pp
+The I/O type is specified in the argument
+.Fa iotype .
+The currently supported I/O types are as follows:
+.Bl -tag -width F1
+.It IOPOL_TYPE_DISK
+This can mean either the I/O policy for I/Os to local disks or to
+remote volumes.
+I/Os to local disks are I/Os sent to the media without going through a network,
+including I/Os to internal and external hard drives, optical media in internal
+and external drives, flash drives, floppy disks, ram disks, and mounted disk
+images which reside on these media.
+I/Os to remote volumes are I/Os that require network activity to complete the
+operation.
+This is currently only supported for remote volumes mounted by SMB or AFP.
+.Pp
+IOPOL_TYPE_DISK supports following values for
+.Fa policy:
.Bl -tag -width IOPOL_PASSIVEXXX
.It IOPOL_IMPORTANT
I/Os with the IMPORTANT policy are unrestricted. This policy should only be
The I/O policy of a newly created process is inherited from its parent
process. The I/O policy of an I/O request is the lowest priority
policy of the current thread and the current process.
+.It IOPOL_TYPE_VFS_ATIME_UPDATES
+This
+.Fa iotype
+lets users change the access time updates policy for the files accessed
+by the current thread or process.
+.Pp
+IOPOL_TYPE_VFS_ATIME_UPDATES supports the following values for
+.Fa policy:
+.Bl -tag -width IOPOL_ATIME_UPDATES_DEFAULT
+.It IOPOL_ATIME_UPDATES_OFF
+The ATIME_UPDATES_OFF policy turns off access time updation for files accessed.
+This policy is useful for applications which access a large number of files
+to reduce the metadata I/O writes.
+.It IOPOL_ATIME_UPDATES_DEFAULT
+This is the default I/O policy for new threads.
+.El
+.Pp
+Like with IOPOL_TYPE_DISK, the I/O policy of a newly created process is
+inherited from its parent process. Access time updates are turned off if the
+I/O policy is set to IOPOL_ATIME_UPDATES_OFF for the current thread or current
+process.
+.It IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES
+This
+.Fa iotype
+lets users change the materialization policy for dataless files accessed
+by the current thread or process.
+.Pp
+IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES supports the following values for
+.Fa policy:
+.Bl -tag -width IOPOL_MATERIALIZE_DATALESS
+.It IOPOL_MATERIALIZE_DATALESS_FILES_DEFAULT
+Selects the default materialization policy.
+For IOPOL_SCOPE_THREAD, all accesses by the current thread will follow the
+process policy.
+For IOPOL_SCOPE_PROCESS, all accesses will follow the system default
+policy
+.Pq IOPOL_MATERIALIZE_DATALESS_FILES_OFF .
+.It IOPOL_MATERIALIZE_DATALESS_FILES_OFF
+Disables materialization of dataless files by the current thread or
+process.
+.It IOPOL_MATERIALIZE_DATALESS_FILES_ON
+Enables materialization of dataless files by the current thread or
+process.
+.El
+.Pp
+New processes inherit the policy of their parent process.
+.El
.Sh RETURN VALUES
The
.Fn getiopolicy_np