Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make capabilities configurable in init() #91

Closed
26 tasks done
cberner opened this issue Nov 15, 2020 · 1 comment
Closed
26 tasks done

Make capabilities configurable in init() #91

cberner opened this issue Nov 15, 2020 · 1 comment

Comments

@cberner
Copy link
Owner

cberner commented Nov 15, 2020

  • FUSE_ASYNC_READ
  • FUSE_POSIX_LOCKS
  • FUSE_FILE_OPS
  • FUSE_ATOMIC_O_TRUNC
  • FUSE_EXPORT_SUPPORT
  • FUSE_BIG_WRITES
  • FUSE_DONT_MASK
  • FUSE_SPLICE_WRITE
  • FUSE_SPLICE_MOVE
  • FUSE_SPLICE_READ
  • FUSE_FLOCK_LOCKS
  • FUSE_HAS_IOCTL_DIR
  • FUSE_AUTO_INVAL_DATA
  • FUSE_DO_READDIRPLUS
  • FUSE_READDIRPLUS_AUTO
  • FUSE_ASYNC_DIO
  • FUSE_WRITEBACK_CACHE
  • FUSE_NO_OPEN_SUPPORT
  • FUSE_PARALLEL_DIROPS
  • FUSE_HANDLE_KILLPRIV
  • FUSE_POSIX_ACL
  • FUSE_ABORT_ERROR
  • FUSE_MAX_PAGES
  • FUSE_CACHE_SYMLINKS
  • FUSE_NO_OPENDIR_SUPPORT
  • FUSE_EXPLICIT_INVAL_DATA
@wmanley
Copy link
Contributor

wmanley commented Mar 29, 2021

Regarding init: I've got some plans to use the typestate pattern to simplify this. The idea is that Init is then no longer a callback, but is a function instead. That way the filesystem callback no longer needs to contain state like is_initialised or do any synchronisation around that. So we'd have a type like:

pub struct ChannelNeedsInit{
    chan: Channel,
    init_msg: op::Init
};
impl ChannelNeedsInit {
    fn init(self, capabilities: u32, ...) -> Channel {
        ...
    }
}

Usage:

let (mount, chan_needs_init) = create_mount("/my/mountpoint");
if chan_needs_init.abi_version() > (7, 19) {
    // Blah blah
}
let chan = chan_needs_init.init(my_capabilities, abi_version, ...);
serve_sync(chan, handler);

I've not yet started implementation of this though. I guess it would serve some of the same purpose as Session, but it would not be parametrized on the Filesystem/Handler type, nor own the Mount.

@wmanley wmanley mentioned this issue Mar 29, 2021
12 tasks
@cberner cberner closed this as completed Jun 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants