fuse-rs icon indicating copy to clipboard operation
fuse-rs copied to clipboard

how to implement setlk and getlk rightly

Open Sherlock-Holo opened this issue 5 years ago • 2 comments

I want to handle the file lock in fuse not kernel, so I implement setlk and getlk method, but I don't see any log about them, even I write a panic!("boom"), the fuse doesn't panic.

Am I doing wrong? If I am wrong, how do I implement them rightly

Sherlock-Holo avatar Feb 19 '20 11:02 Sherlock-Holo

also, I try the branch modernize, same problem. If I modify the lib codes and use higher abi, cargo check report some errors

Sherlock-Holo avatar Feb 19 '20 11:02 Sherlock-Holo

I modify the fuse-rs codes, when init fuse, change the

const INIT_FLAGS: u32 = FUSE_ASYNC_READ ;

to

const INIT_FLAGS: u32 = FUSE_ASYNC_READ | FUSE_POSIX_LOCKS;

to fix it

Sherlock-Holo avatar Feb 20 '20 07:02 Sherlock-Holo