From owner-svn-src-all@freebsd.org Wed Jun 6 22:29:23 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3728EFE539E; Wed, 6 Jun 2018 22:29:23 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CB31A69DA0; Wed, 6 Jun 2018 22:29:22 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8DD6711041; Wed, 6 Jun 2018 22:29:22 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w56MTMtj082486; Wed, 6 Jun 2018 22:29:22 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w56MTMkg082484; Wed, 6 Jun 2018 22:29:22 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201806062229.w56MTMkg082484@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 6 Jun 2018 22:29:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r334742 - stable/11/sys/fs/msdosfs X-SVN-Group: stable-11 X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: stable/11/sys/fs/msdosfs X-SVN-Commit-Revision: 334742 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jun 2018 22:29:23 -0000 Author: pfg Date: Wed Jun 6 22:29:21 2018 New Revision: 334742 URL: https://svnweb.freebsd.org/changeset/base/334742 Log: MFC r333311: msdosfs: use vfs_timestamp() to generate timestamps instead of getnanotime(). Most filesystems, with the notable exceptions of msdosfs and autofs use only vfs_timestamp() to read the current time. This has the benefit of configurable granularity (using the vfs.timestamp_precision sysctl). For convenience, use it on msdosfs too. Submitted by: Damjan Jovanovic Modified: stable/11/sys/fs/msdosfs/msdosfs_denode.c stable/11/sys/fs/msdosfs/msdosfs_vnops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/msdosfs/msdosfs_denode.c ============================================================================== --- stable/11/sys/fs/msdosfs/msdosfs_denode.c Wed Jun 6 22:18:24 2018 (r334741) +++ stable/11/sys/fs/msdosfs/msdosfs_denode.c Wed Jun 6 22:29:21 2018 (r334742) @@ -295,7 +295,7 @@ deupdat(struct denode *dep, int waitfor) DE_MODIFIED); return (0); } - getnanotime(&ts); + vfs_timestamp(&ts); DETIMES(dep, &ts, &ts, &ts); if ((dep->de_flag & DE_MODIFIED) == 0 && waitfor == 0) return (0); Modified: stable/11/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- stable/11/sys/fs/msdosfs/msdosfs_vnops.c Wed Jun 6 22:18:24 2018 (r334741) +++ stable/11/sys/fs/msdosfs/msdosfs_vnops.c Wed Jun 6 22:29:21 2018 (r334742) @@ -176,7 +176,7 @@ msdosfs_create(struct vop_create_args *ap) ndirent.de_FileSize = 0; ndirent.de_pmp = pdep->de_pmp; ndirent.de_flag = DE_ACCESS | DE_CREATE | DE_UPDATE; - getnanotime(&ts); + vfs_timestamp(&ts); DETIMES(&ndirent, &ts, &ts, &ts); error = createde(&ndirent, pdep, &dep, cnp); if (error) @@ -214,7 +214,7 @@ msdosfs_close(struct vop_close_args *ap) VI_LOCK(vp); if (vp->v_usecount > 1) { - getnanotime(&ts); + vfs_timestamp(&ts); DETIMES(dep, &ts, &ts, &ts); } VI_UNLOCK(vp); @@ -264,7 +264,7 @@ msdosfs_getattr(struct vop_getattr_args *ap) u_long dirsperblk = pmp->pm_BytesPerSec / sizeof(struct direntry); uint64_t fileid; - getnanotime(&ts); + vfs_timestamp(&ts); DETIMES(dep, &ts, &ts, &ts); vap->va_fsid = dev2udev(pmp->pm_dev); /* @@ -1327,7 +1327,7 @@ msdosfs_mkdir(struct vop_mkdir_args *ap) bzero(&ndirent, sizeof(ndirent)); ndirent.de_pmp = pmp; ndirent.de_flag = DE_ACCESS | DE_CREATE | DE_UPDATE; - getnanotime(&ts); + vfs_timestamp(&ts); DETIMES(&ndirent, &ts, &ts, &ts); /*