Implement relatime.

Add the "relatime" property.  When set to "on", a file's atime will only
be updated if the existing atime at least a day old or if the existing
ctime or mtime has been updated since the last access.  This behavior
is compatible with the Linux "relatime" mount option.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2064
Closes #1917
This commit is contained in:
Tim Chase
2014-01-18 13:00:53 -06:00
committed by Brian Behlendorf
parent 2278381ce2
commit 6d111134c0
7 changed files with 110 additions and 10 deletions
+13 -1
View File
@@ -738,7 +738,7 @@ the \fBxattr=sa\fR property. See the \fBxattr\fR property for more details.
.ad
.sp .6
.RS 4n
Controls whether the access time for files is updated when they are read. Turning this property off avoids producing write traffic when reading files and can result in significant performance gains, though it might confuse mailers and other similar utilities. The default value is \fBon\fR.
Controls whether the access time for files is updated when they are read. Turning this property off avoids producing write traffic when reading files and can result in significant performance gains, though it might confuse mailers and other similar utilities. The default value is \fBon\fR. See also \fBrelatime\fR below.
.RE
.sp
@@ -1021,6 +1021,17 @@ If \fBrefreservation\fR is set, a snapshot is only allowed if there is enough fr
This property can also be referred to by its shortened column name, \fBrefreserv\fR.
.RE
.sp
.ne 2
.mk
.na
\fB\fBrelatime\fR=\fBon\fR | \fBoff\fR\fR
.ad
.sp .6
.RS 4n
Controls the manner in which the access time is updated when \fBatime=on\fR is set. Turning this property \fBon\fR causes the access time to be updated relative to the modify or change time. Access time is only updated if the previous access time was earlier than the current modify or change time or if the existing access time hasn't been updated within the past 24 hours. The default value is \fBoff\fR.
.RE
.sp
.ne 2
.mk
@@ -3184,6 +3195,7 @@ pool/home/bob usedbyrefreservation 0 -
pool/home/bob logbias latency default
pool/home/bob dedup off default
pool/home/bob mlslabel none default
pool/home/bob relatime off default
.fi
.in -2
.sp