cberner / fuser

Filesystem in Userspace (FUSE) for Rust
MIT License
836 stars 114 forks source link

Support BSD style locks #155

Open cberner opened 3 years ago

cberner commented 3 years ago

libfuse has a separate flock() method for setting BSD style locks. This is necessary because the semantics are different and BSD locks are independent from POSIX locks.

Notes: The lk_flags field must be checked, like libfuse does: https://github.com/libfuse/libfuse/blob/e032ca7a88afe1a7cd028ca63e2993af9c0b91af/lib/fuse_lowlevel.c#L1648

Useful links on lock behavior: