FROMLIST: fuse: Definitions and ioctl for passthrough
Expose the FUSE_PASSTHROUGH interface to user space and declare all the basic data structures and functions as the skeleton on top of which the FUSE passthrough functionality will be built. As part of this, introduce the new FUSE passthrough ioctl, which allows the FUSE daemon to specify a direct connection between a FUSE file and a lower file system file. Such ioctl requires user space to pass the file descriptor of one of its opened files through the fuse_passthrough_out data structure introduced in this patch. This structure includes extra fields for possible future extensions. Also, add the passthrough functions for the set-up and tear-down of the data structures and locks that will be used both when fuse_conns and fuse_files are created/deleted. Bug: 168023149 Link: https://lore.kernel.org/lkml/20210125153057.3623715-4-balsini@android.com/ Signed-off-by: Alessio Balsini <balsini@android.com> Change-Id: I732532581348adadda5b5048a9346c2b0868d539 Signed-off-by: Alessio Balsini <balsini@google.com>
This commit is contained in:
@@ -152,7 +152,7 @@ int fuse_do_open(struct fuse_mount *fm, u64 nodeid, struct file *file,
|
||||
if (!err) {
|
||||
ff->fh = outarg.fh;
|
||||
ff->open_flags = outarg.open_flags;
|
||||
|
||||
fuse_passthrough_setup(fc, ff, &outarg);
|
||||
} else if (err != -ENOSYS) {
|
||||
fuse_file_free(ff);
|
||||
return err;
|
||||
@@ -298,6 +298,8 @@ void fuse_release_common(struct file *file, bool isdir)
|
||||
struct fuse_release_args *ra = ff->release_args;
|
||||
int opcode = isdir ? FUSE_RELEASEDIR : FUSE_RELEASE;
|
||||
|
||||
fuse_passthrough_release(&ff->passthrough);
|
||||
|
||||
fuse_prepare_release(fi, ff, file->f_flags, opcode);
|
||||
|
||||
if (ff->flock) {
|
||||
|
||||
Reference in New Issue
Block a user