Skip to content
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

Linux and Posix file locking support. #108

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

awgn
Copy link

@awgn awgn commented Oct 28, 2021

The PR includes:

  • POSIX and Linux file locking support via FileLock operation
  • Annotation of UID and GID of the callee process
  • OpRename workaround for buggy macFuse 4.2.x
  • Minor bugs fixed.

Copy link
Collaborator

@stapelberg stapelberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR!

Could you add a test please, too, and rebase this PR on top of the current branch?

OpContext: fuseops.OpContext{Pid: inMsg.Header().Pid},
Parent: fuseops.InodeID(hdr.Nodeid),
Name: string(buf[:n-1]),
OpContext: fuseops.OpContext{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of repeating this struct initialization over and over again, could you factor it out into a opContext(hdr *fusekernel.InHeader) OpContext helper function?

// macFuse 4.2.1 workaround: the kernel implementation is buggy.
// It call OpRename with the data type of OpRename2. The workaround consists
// in skipping the first 8 bytes of names (which are zeroes).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove empty line

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workaround was probably already merged in my PR #107 %)

@@ -113,6 +113,10 @@ type MountConfig struct {
// syscall doesn't return until the file system returns.
DisableWritebackCaching bool

// Enable Posix file locking

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove empty line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants