summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2016-03-21 07:36:02 +0000
committermav <mav@FreeBSD.org>2016-03-21 07:36:02 +0000
commitaf59995fd1fab9bd8a8272f9aaeb17f07dbc5e2f (patch)
tree976647ed28aa59ff6180f6c516f59b1941fb106e
parent1872309b16f2868c2f0337a5c5c4438a2ff82082 (diff)
downloadFreeBSD-src-af59995fd1fab9bd8a8272f9aaeb17f07dbc5e2f.zip
FreeBSD-src-af59995fd1fab9bd8a8272f9aaeb17f07dbc5e2f.tar.gz
MFC r277629 (by will):
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.
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
index eb0581f..04f0b6c 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
@@ -795,7 +795,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);
}
@@ -1437,7 +1437,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;
OpenPOWER on IntegriCloud