Hi UNFS3 team,
First off, a big thank you, and a round of applause from all the users of UNFS3 over the years. Great work!
Now, unfortunately it's time to look for a "proof of life" of this project. I notice patches and issues sitting unremarked for years.
Can you please respond to this issue if this project is alive?
If no response in one week, as a community we can regard this project as dead, and start looking for a new upstream.
Thanks!
-Marc
See also: https://github.com/codekitchen/dinghy/issues/269#issuecomment-381701748
Hi there,
unfs3 hasn't received much time and effort from myself and others over the last years, and while I really like to say that the maintainers (at least us from Cendio AB) have every intention to be facilitators for great, vibrant, open source projects. Then again, intentions are worthless - actions count. I can't refute your comments about patches and issues rotting in SourceForge. If that's your measure of dead, then I guess we're dead. :)
If you or someone on your team is willing to contribute a fix for nano-second timestamp resolutions, that would be most welcome.
Thanks @karl. Sounds like it would be to say that this project is only mostly dead, then?
Please let us know : our cursory understanding is that UNFS3 already supports nanosecond timestamps, and that the required fix would be to add support for this on APFS on Mac OS High Sierra only. We imagined that this would be taking the bits from other projects (such as go-lang) that added this support, and weaving them into the appriopriate places in UNFS3.
Are these assumptions correct? Is it true that UNFS3 supports nanosecond timestamps in general, and just needs the support for High Sierra added?
And secondly: If we were to develop a patch, how would we go about submitting it?
Our extreme preference would be to develop as a Github pull request against the mirror repo there, as that is a workflow everyone is comfortable with and the development would be very public.
If you don't control that repo, our second preference would be to create our own mirror on Github, and do the same there.
But if the requirement is to email patches or whatever, I don't think there's any chance.
Feel free to submit pull requests against https://github.com/unfs3/unfs3
To address the technical issues here, the NFS protocol supports nanosecond resolution timestamps. The issue with unfsd seems to be that the integration with the OS uses utime, which supports a resolution of seconds. There are other API:s (utimes, utimensat) which supports higher resolution timestamps (microseconds/nanoseconds).
This looks to be an issue on all platforms, and not just macOS or High Sierra in particular. I've made a prototype of a fix on a branch over at github. I haven't really done anything other than verify that it compiles on macOS, so don't blame me if it doesn't build or if it crashes :)
Thanks so much @derfian ! I've built your branch from github on Mac OS High Sierra and can verify that it at least compiles and runs. Please note: I am posting here because Issues are not enabled on your GitHub repo.
Unfortunately, I've verified that when your branch of the unfs3 server is running on the Mac OS host, when a Ubuntu Linux client mounts the directory, it reports the nanosecond timestamps as still being all zero.
For example, inside a Ubuntu container that has mounted the UNFS3 share in
/app:But there is progress! I think your patch has fixed setting the time, as you can observe the following
mtimein nanoseconds on the Mac OS server host:Therefore, my hypothesis is:
After reviewing the code, could it be as simple as editing
attr.cin the functionsget_pre_cachedandget_post_bufto set the nanosecond fields from thebackend_statstruct bufinstead of setting to literal0values?Or, is it necessary to also add
#ifdefblocks in the place where the stat call is made?I've pushed more commits to my branch, give it a try. I haven't really tested much, so it's the same as before. I'm mostly concerned with writing portable code. I don't think clock_gettime and struct timespec will be available on older platforms.
Thanks @derfian.
On Mac OS High Sierra, I get a build failure:
@derfian, perhaps I am missing something, but it seems likely to me that we're simply missing at the top of
clock_gettime.cthe regular old:I ask because I noticed that
clock_gettimeand thereforeconfig.his generated containing#define HAVE_CLOCK_GETTIME 1clock_gettime.cis checking#ifndef HAVE_CLOCK_GETTIME, but this will always fail because it doesn't#include "config.h"Does the above make sense? Apologies of this is way off.
Yep, that's it. I've pushed a new commit for this problem, thanks for letting me know.
Hurray! @derfian I've verified your fix! :)
I have verifed by running Dinghy on Mac OS High Sierra (10.13.4). In order to verify your fix, I had to kill the
fsevents_to_vmpart of Dinghy, as that appears to have a separate issue with it. This leaves us with a Linux VM running in VirtualBox withboot2dockerrunning inside, and mounting my home directory via your branch of unfs3.A. On Mac OS, run Dinghy with your branch of unfs3:
B. Touch and stat file on the host Mac OS
C. Stat and touch and stat file inside container Ubuntu
D. Stat files again on the host Mac OS
Last edit: Marc Siegel 2018-05-16
Since the nanosecond timestamps now work on your branch -- what is the process to make a release that includes this code?
Hi @derfian, ping on making a release ?
I have a few portability concerns about the new code that I'd like to review before merging to master. Making a new release isn't at the top of my priority list at the moment.
No worries, I understand. In the meantime, would you be willing to commit to keeping your existing Github branch available at the same path? Could we temporarily make dinghy depend on that branch to build, to get Mac OS docker users back into good shape, and later change the dependency to be your next release?
Sure, I will do that. I don't mind having the dinghy team depend on this branch until everything else settles into place.
+1 sounds good @derfian
For reference, here's a PR to homebrew-dinghy to change the UNFS3 dependency to your branch:
https://github.com/codekitchen/homebrew-dinghy/pull/2