loopback: Utimens: enable Nsec precision for dates after 1970#131
Merged
hanwen merged 1 commit intohanwen:masterfrom Oct 28, 2016
Merged
loopback: Utimens: enable Nsec precision for dates after 1970#131hanwen merged 1 commit intohanwen:masterfrom
hanwen merged 1 commit intohanwen:masterfrom
Conversation
hanwen
requested changes
Sep 27, 2016
fuse/nodefs/files_linux.go
Outdated
| } else { | ||
| ts[1] = syscall.NsecToTimespec(a.UnixNano()) | ||
| ts[1].Nsec = 0 | ||
| ts[1] = syscall.NsecToTimespec(m.UnixNano()) |
Owner
There was a problem hiding this comment.
maybe have our own nsecToTimespec() that does this just once?
Contributor
Author
|
Done in the second commit: 6e43fd0 |
Contributor
Author
|
Ping? The typo in files_linux.go#L41 causes crashes in gocryptfs ( rfjakob/gocryptfs#48 ). This is also fixed in this PR. |
rfjakob
added a commit
to rfjakob/gocryptfs
that referenced
this pull request
Oct 16, 2016
Crash is described at #48 . Revert this once hanwen/go-fuse#131 is merged.
rfjakob
added a commit
to rfjakob/gocryptfs
that referenced
this pull request
Oct 16, 2016
Revert once hanwen/go-fuse#131 is merged.
Contributor
Author
|
Hi @hanwen , is there anything else I can do to get this merged? |
Owner
|
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.
Contributor
Author
|
Squashed and updated. Sorry about that binary! It's gone now as well. |
rfjakob
added a commit
to rfjakob/gocryptfs
that referenced
this pull request
Oct 30, 2016
The fix at hanwen/go-fuse#131 has been merged. Drop the workarounds and re-enable the tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
syscall.NsecToTimespec is broken for dates before 1970 but works
fine otherwise.
Fix #100 as well and add a testcase.