-
Notifications
You must be signed in to change notification settings - Fork 113
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
xattrs: use unix flocks when writing multiple xattrs #2528
Conversation
dbafbd0
to
e2c0a09
Compare
I think this can only be the start. A bit of copy & paste from the flock() manpage (linux system call):
|
https://github.com/gofrs/flock was the first implementation we looked at, but stumbled over the fact that it is intendet to write a lock file, not folders. Furthermore, we discovered the proposal to expose the existing locking implementation in the internal |
we will use it comes with nice TryLockCtx methods which wrap around the functionality we want. |
c980bd9
to
3d05587
Compare
3d05587
to
2a5bddc
Compare
d941ae0
to
2444137
Compare
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
To lock, a file with the ending .flock is created beside the to be locked node (which also can be a directory) which is locked with a Lock. Other ocis processes respect that.
Co-authored-by: David Christofas <dchristofas@owncloud.com>
2444137
to
5d403e0
Compare
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.
Awesome stuff!
Co-authored-by: David Christofas <dchristofas@posteo.de>
checking the flock implementation options...