1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

When creating or updating a node, use vfs_timestamp() for "now" instead

of gethrestime(), to allow the administrator to decide the appropriate
timestamp precision instead of always using nanosecond precision.
This commit is contained in:
Will Andrews 2015-01-24 00:43:02 +00:00
parent ff6fcf6e0b
commit b4e360d239
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=277629

View File

@ -794,7 +794,7 @@ zfs_mknode(znode_t *dzp, vattr_t *vap, dmu_tx_t *tx, cred_t *cr,
gen = vap->va_nblocks; /* ditto */
} else {
obj = 0;
gethrestime(&now);
vfs_timestamp(&now);
gen = dmu_tx_get_txg(tx);
}
@ -1426,7 +1426,7 @@ zfs_tstamp_update_setup(znode_t *zp, uint_t flag, uint64_t mtime[2],
{
timestruc_t now;
gethrestime(&now);
vfs_timestamp(&now);
if (have_tx) { /* will sa_bulk_update happen really soon? */
zp->z_atime_dirty = 0;