cloud-hypervisor / fuse-backend-rs

Rust crate for implementing FUSE backends
Apache License 2.0
132 stars 67 forks source link

Conflicting PERFILE_DAX flag #65

Open bsbernd opened 2 years ago

bsbernd commented 2 years ago

Incompatible PERFILE_DAX flag. I only noticed about this project as Vivek Goyal pointed me to it on the fsdevel list and I checked used flags because of this patch https://marc.info/?l=linux-fsdevel&m=165002361802294&w=2 And then noticed that PERFILE_DAX flag is conflicting with FUSE_INIT_EXT

Looks like you are on a non-upstream kernel with patches?

linux master include/uapi/linux/fuse.h

...

define FUSE_INIT_EXT (1 << 30)

define FUSE_INIT_RESERVED (1 << 31)

/ bits 32..63 get shifted down 32 bits into the flags2 field /

define FUSE_SECURITY_CTX (1ULL << 32)

define FUSE_HAS_INODE_DAX (1ULL << 33)

Btw, any reason you are not using 1 << number for the flags? In my personal opinion so much easier to read...

jiangliu commented 2 years ago

Thanks for reminder:) The current valued is used for early per-file DAX patch versions. The value has been changed just before merging the PR. And we are lacked behind to update fuse-backend-rs to the latest code:) Also PR is welcomed here:)

https://lwn.net/Articles/838916/

jiangliu commented 2 years ago

Btw, any reason you are not using 1 << number for the flags? In my personal opinion so much easier to read...

That's a good suggestion. The current coding style is derived from original work from the crosvm project. And we are happy to improve code readability.

adamqqqplay commented 1 year ago

@bsbernd Hi, looks like PR #105 fixed this issue. Maybe you can upgrade the dependencies soon.