[Bug 217560] FAT32 - Time stamp of file is one hour off

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Apr 29 03:37:56 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217560

--- Comment #5 from Damjan Jovanovic <damjan.jov at gmail.com> ---
Created attachment 192889
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=192889&action=edit
Use vfs_timestamp() instead of getnanotime() in msdosfs

I've noticed msdosfs uses getnanotime() to generate timestamps, unlike ufs,
ext2fs, devfs, nandfs, nfsclient, nfsserver, and tmpfs, which all use the
better vfs_timestamp() function instead (which allows filesystem timestamp
granularity to be configured using the vfs.timestamp_precision sysctl). Only
autofs and msdosfs use getnanotime().

Patching msdosfs to use vfs_timestamp() instead, seems to also fix this bug
here, with msdosfs timestamps having the timezone offset added to them a second
time when read.

Please find my patch attached.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-fs mailing list