FreeBSD Bugzilla – Attachment 192889 Details for
Bug 217560
FAT32 - Time stamp of file is one hour off
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Use vfs_timestamp() instead of getnanotime() in msdosfs
0001-Use-vfs_timestamp-instead-of-getnanotime-for-the-msd.patch (text/plain), 2.14 KB, created by
Damjan Jovanovic
on 2018-04-29 03:37:54 UTC
(
hide
)
Description:
Use vfs_timestamp() instead of getnanotime() in msdosfs
Filename:
MIME Type:
Creator:
Damjan Jovanovic
Created:
2018-04-29 03:37:54 UTC
Size:
2.14 KB
patch
obsolete
>From fc1084f87787d7aa94b12207e1b5ec91319c7f13 Mon Sep 17 00:00:00 2001 >From: Damjan Jovanovic <damjan.jov@gmail.com> >Date: Sun, 29 Apr 2018 05:25:06 +0200 >Subject: [PATCH] Use vfs_timestamp() instead of getnanotime() for the msdosfs > file system, like all other filesystems do. This also seems to fix issues > with wrong timezone conversions. > >--- > sys/fs/msdosfs/msdosfs_denode.c | 2 +- > sys/fs/msdosfs/msdosfs_vnops.c | 8 ++++---- > 2 files changed, 5 insertions(+), 5 deletions(-) > >diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c >index 9b31fa2171ad..d5908551c847 100644 >--- a/sys/fs/msdosfs/msdosfs_denode.c >+++ b/sys/fs/msdosfs/msdosfs_denode.c >@@ -297,7 +297,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); >diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c >index 3fd0c027f85a..ff720d7c4f67 100644 >--- a/sys/fs/msdosfs/msdosfs_vnops.c >+++ b/sys/fs/msdosfs/msdosfs_vnops.c >@@ -178,7 +178,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) >@@ -216,7 +216,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); >@@ -268,7 +268,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); > /* >@@ -1332,7 +1332,7 @@ msdosfs_mkdir(struct vop_mkdir_args *ap) > memset(&ndirent, 0, 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); > > /* >-- >2.17.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 217560
:
192889