diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2019-09-10 15:04:10 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2019-09-10 16:29:49 +0200 |
commit | 1259728731a7902c4965952c55fa16014b4fd0e7 (patch) | |
tree | 3821ca6b5e930157a48fa2ca0948a9e7d7fa7fcc /fs/fuse/fuse_i.h | |
parent | fuse: convert sync write to simple api (diff) | |
download | linux-1259728731a7902c4965952c55fa16014b4fd0e7.tar.xz linux-1259728731a7902c4965952c55fa16014b4fd0e7.zip |
fuse: add simple background helper
Create a helper named fuse_simple_background() that is similar to
fuse_simple_request(). Unlike the latter, it returns immediately and calls
the supplied 'end' callback when the reply is received.
The supplied 'args' pointer is stored in 'fuse_req' which allows the
callback to interpret the output arguments decoded from the reply.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/fuse_i.h')
-rw-r--r-- | fs/fuse/fuse_i.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index b62a3e37ea4c..8f46c5549e57 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h @@ -301,6 +301,7 @@ struct fuse_args { bool page_replace:1; struct fuse_in_arg in_args[3]; struct fuse_arg out_args[2]; + void (*end)(struct fuse_conn *fc, struct fuse_args *args, int error); }; struct fuse_args_pages { @@ -381,6 +382,9 @@ struct fuse_req { /** Entry on the interrupts list */ struct list_head intr_entry; + /* Input/output arguments */ + struct fuse_args *args; + /** refcount */ refcount_t count; @@ -948,6 +952,8 @@ void fuse_request_send(struct fuse_conn *fc, struct fuse_req *req); * Simple request sending that does request allocation and freeing */ ssize_t fuse_simple_request(struct fuse_conn *fc, struct fuse_args *args); +int fuse_simple_background(struct fuse_conn *fc, struct fuse_args *args, + gfp_t gfp_flags); /** * Send a request in the background |