cloud-hypervisor / fuse-backend-rs

Rust crate for implementing FUSE backends
Apache License 2.0
129 stars 63 forks source link

sync_io: Only read InitIn2 if FUSE version is above 7.36 #157

Closed griff closed 8 months ago

griff commented 9 months ago

MacFUSE has INIT_EXT flag set but doesn't support the InitIn2 message since its minor version is only 19 and the comment for InitIn2 indicates that is was introduced in FUSE 7.36.

So this change simply adds a check for minor version larger than 35 and everything seems to work after that.

bergwolf commented 8 months ago

@griff Is it a macfuse bug? FUSE_INIT_EXT was introduced in FUSE 7.36 to explicitly support InitIn2.

 191  *  7.36
 192  *  - extend fuse_init_in with reserved fields, add FUSE_INIT_EXT init flag

We can accept the patch as a workaround but IMHO it should be fixed on the macfuse side as well.

griff commented 8 months ago

@bergwolf I dug a little deeper and the issue is that MacFUSE is a fork with its own flags that clash with those defined in later versions of FUSE. Sorry for wasting your time with this PR. I have opened #162 to hopefully deal with the underlying issue and am closing this.