zargony / fuse-rs

Rust library for filesystems in userspace (FUSE)
MIT License
1.05k stars 131 forks source link

Add support for ATIME_NOW and MTIME_NOW #130

Closed cberner closed 1 year ago

cberner commented 4 years ago

@zargony any feedback on this PR? Happy to make changes if you'd like

zargony commented 4 years ago

Hey @cberner. Thanks a lot for adding atime/mtime support! Though there are two reasons why I'd like to delay this PR a bit. 1) I'd like to finish #126 first which significantly changes how request and replies are handled in rust-fuse 2) I'm not sure if we want to have abi version related feature flags on the main crate. I feel like it would be more appropriate to have higher level feature flags. This isn't well thought through or discussed yet though. Having flags like feature(atime_mtime) would be nice, but that could lead to a lot of feature flags and might become confusing quickly. Flags for major fuse release versions would be nice, but that seems to be hard to map to different versions of Linux/macOS/FreeBSD. I'm not sure what would be best here (we should probably discuss that in general in a separate issue).

cberner commented 4 years ago

Ok, that's fine. I'll follow #126 to see when it's merged, and then rebase on it. Sure, named feature flags sounds easier to use. It doesn't seem like it will create too many, since most new FUSE versions seem to only add one or two new features

cberner commented 4 years ago

@zargony just checking in. Any estimate when you will merge #126?

zargony commented 4 years ago

I'm so sorry about the slow progress, I don't get a lot of free time these days to work on this. I just added the new filesystem trait and started to work on porting the session (which is the last missing piece besides a lot of other open questions). I'm afraid that it'll still take a few weeks to get it to a working state. If you'd like to help, there are still several pieces calling for discussion/implementation, like a modern reply type for directories or xattr lists or a channel implementation that can be used asynchronously. Or more general things like how to do feature gates that require specific abi versions :)

cberner commented 4 years ago

Ya, I'm happy to help out! The feature gates sound like an easy place for me to start, since I already looked at those a bit. I think it makes the most sense to have a feature flag for each ABI version, and then link to the fuse documentation, given that each version may add many features. If you prefer having a flag for each logical feature that then maps to the cooresponding ABI version, I can certainly implement that instead. Let me know!