-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
loopback: Utimens: enable Nsec precision for dates after 1970 #131
Conversation
} | ||
|
||
if m == nil { | ||
ts[1].Nsec = _UTIME_OMIT | ||
} else { | ||
ts[1] = syscall.NsecToTimespec(a.UnixNano()) | ||
ts[1].Nsec = 0 | ||
ts[1] = syscall.NsecToTimespec(m.UnixNano()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe have our own nsecToTimespec() that does this just once?
Done in the second commit: 6e43fd0 |
Ping? The typo in files_linux.go#L41 causes crashes in gocryptfs ( rfjakob/gocryptfs#48 ). This is also fixed in this PR. |
Crash is described at #48 . Revert this once hanwen/go-fuse#131 is merged.
Revert once hanwen/go-fuse#131 is merged.
Hi @hanwen , is there anything else I can do to get this merged? |
sorry, this went off my radar. Can you squash the commit, and drop the fuse.test binary from it? |
1) Fix the "a" instead of "m" typo in loopbackFile.Utimens. Besides the incorrect behavoir, this causes a crash if "a" is nil. Obsoletes hanwen#100 . 2) Enable nanosecond resolution for dates after 1970. syscall.NsecToTimespec is broken for dates before 1970 but works fine otherwise, so let's keep the nanoseconds there. 3) Deduplicate the time conversion code in nodefs and paths into the new function fuse.UtimeToTimespec. 4) Add a test case.
Squashed and updated. Sorry about that binary! It's gone now as well. |
The fix at hanwen/go-fuse#131 has been merged. Drop the workarounds and re-enable the tests.
syscall.NsecToTimespec is broken for dates before 1970 but works
fine otherwise.
Fix #100 as well and add a testcase.