diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2022-11-10 15:46:33 +0100 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2023-01-26 17:10:37 +0100 |
commit | 15d937d7ca8c55d2b0ce9116e20c780fdd0b67cc (patch) | |
tree | c679eb27d286dc1630806095c040ef3de951247a /fs/fuse/dev.c | |
parent | 1b929c02afd37871d5afb9d498426f83432e71c2 (diff) |
fuse: add request extension
Will need to add supplementary groups to create messages, so add the
general concept of a request extension. A request extension is appended to
the end of the main request. It has a header indicating the size and type
of the extension.
The create security context (fuse_secctx_*) is similar to the generic
request extension, so include that as well in a backward compatible manner.
Add the total extension length to the request header. The offset of the
extension block within the request can be calculated by:
inh->len - inh->total_extlen * 8
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/dev.c')
-rw-r--r-- | fs/fuse/dev.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index e8b60ce72c9a..9f349f834977 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -476,6 +476,8 @@ static void fuse_args_to_req(struct fuse_req *req, struct fuse_args *args) req->in.h.opcode = args->opcode; req->in.h.nodeid = args->nodeid; req->args = args; + if (args->is_ext) + req->in.h.total_extlen = args->in_args[args->ext_idx].size / 8; if (args->end) __set_bit(FR_ASYNC, &req->flags); } |