Skip to content

Filesystem::init return value is ignored #198

@nrath-js

Description

@nrath-js

As far as I can tell, the set of options returned by a Filesystem's init method is simply thrown away:

https://github.com/cloud-hypervisor/fuse-backend-rs/blob/master/src/api/vfs/sync_io.rs#L55

I can also see this in the debug output for a test filesystem.

2024-11-27T18:00:39.545827Z TRACE fuse: new req Init: InHeader { len: 104, opcode: 26, unique: 2, nodeid: 0x0, uid: 0, gid: 0, pid: 0, padding: 0 }    
2024-11-27T18:00:39.545959Z DEBUG init{_capable=ASYNC_READ | ATOMIC_O_TRUNC | BIG_WRITES | HAS_IOCTL_DIR | AUTO_INVAL_DATA | DO_READDIRPLUS | READDIRPLUS_AUTO | ASYNC_DIO | WRITEBACK_CACHE | PARALLEL_DIROPS | MAX_PAGES | CACHE_SYMLINKS | EXPLICIT_INVAL_DATA | PERFILE_DAX}: enter
2024-11-27T18:00:39.545994Z DEBUG init{_capable=ASYNC_READ | ATOMIC_O_TRUNC | BIG_WRITES | HAS_IOCTL_DIR | AUTO_INVAL_DATA | DO_READDIRPLUS | READDIRPLUS_AUTO | ASYNC_DIO | WRITEBACK_CACHE | PARALLEL_DIROPS | MAX_PAGES | CACHE_SYMLINKS | EXPLICIT_INVAL_DATA | PERFILE_DAX}: return=ASYNC_READ | EXPORT_SUPPORT | ASYNC_DIO | PARALLEL_DIROPS | CACHE_SYMLINKS
2024-11-27T18:00:39.546059Z  INFO FUSE INIT major 7 minor 38
 in_opts: ASYNC_READ | POSIX_LOCKS | ATOMIC_O_TRUNC | EXPORT_SUPPORT | BIG_WRITES | DONT_MASK | SPLICE_WRITE | SPLICE_MOVE | SPLICE_READ | FLOCK_LOCKS | HAS_IOCTL_DIR | AUTO_INVAL_DATA | DO_READDIRPLUS | READDIRPLUS_AUTO | ASYNC_DIO | WRITEBACK_CACHE | ZERO_MESSAGE_OPEN | PARALLEL_DIROPS | HANDLE_KILLPRIV | POSIX_ACL | ABORT_ERROR | MAX_PAGES | CACHE_SYMLINKS | ZERO_MESSAGE_OPENDIR | EXPLICIT_INVAL_DATA | HANDLE_KILLPRIV_V2 | INIT_EXT | PERFILE_DAX
out_opts: ASYNC_READ | ATOMIC_O_TRUNC | BIG_WRITES | HAS_IOCTL_DIR | AUTO_INVAL_DATA | DO_READDIRPLUS | READDIRPLUS_AUTO | ASYNC_DIO | WRITEBACK_CACHE | PARALLEL_DIROPS | MAX_PAGES | CACHE_SYMLINKS | EXPLICIT_INVAL_DATA | PERFILE_DAX    
2024-11-27T18:00:39.546082Z TRACE fuse: new reply OutHeader { len: 80, error: 0, unique: 2 }    

The DEBUG init [...] messages are generated by the test filesystem and indicate input arguments and the return value. Observe how e.g. the DO_READDIRPLUS flag is not included in the output, yet it shows up in out_opts.

Am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions