diff options
| author | Miklos Szeredi <mszeredi@redhat.com> | 2026-04-01 09:02:14 +0200 |
|---|---|---|
| committer | Miklos Szeredi <mszeredi@redhat.com> | 2026-06-15 14:06:18 +0200 |
| commit | c0f817320d6afc8c609400e235f6f16636ed871b (patch) | |
| tree | 82e36da16776e1ce7eaa2126330eb1a56975dddb /fs/fuse/dev.h | |
| parent | b03404ea3a05668d374c87741c397a4eeaf4dd81 (diff) | |
| download | linux-next-c0f817320d6afc8c609400e235f6f16636ed871b.tar.gz linux-next-c0f817320d6afc8c609400e235f6f16636ed871b.zip | |
fuse: remove #include "fuse_i.h" from dev.c and dev_uring.c
Move a couple of function declarations from fuse_i.h to dev.h and
fuse_dev_i.h.
Add fuse_conn_get_id() helper that retrieves the connection ID (s_dev) from
fuse_conn.
With the exception of cuse.c, virtio_fs.c and trace.c source files now
either include fuse_i.h or fuse_dev_i/dev_uring_i.h but not both.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/dev.h')
| -rw-r--r-- | fs/fuse/dev.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/fs/fuse/dev.h b/fs/fuse/dev.h index 6437331058d9..aed69fd14c41 100644 --- a/fs/fuse/dev.h +++ b/fs/fuse/dev.h @@ -13,6 +13,7 @@ struct fuse_chan; struct fuse_dev; struct fuse_args; struct fuse_copy_state; +struct fuse_backing_map; struct file; struct folio; enum fuse_notify_code; @@ -45,6 +46,16 @@ void fuse_chan_queue_forget(struct fuse_chan *fch, struct fuse_forget_link *forg DEFINE_FREE(fuse_chan_free, struct fuse_chan *, if (_T) fuse_chan_free(_T)) +/** + * Initialize the client device + */ +int fuse_dev_init(void); + +/** + * Cleanup the client device + */ +void fuse_dev_cleanup(void); + void fuse_dev_install(struct fuse_dev *fud, struct fuse_chan *fch); bool fuse_dev_verify(struct fuse_dev *fud, struct fuse_chan *fch); void fuse_dev_put(struct fuse_dev *fud); @@ -58,10 +69,25 @@ void fuse_init_server_timeout(struct fuse_chan *fch, unsigned int timeout); void fuse_chan_abort(struct fuse_chan *fch, bool abort_with_err); void fuse_chan_wait_aborted(struct fuse_chan *fch); +/** + * Acquire reference to fuse_conn + */ +struct fuse_conn *fuse_conn_get(struct fuse_conn *fc); + +/** + * Release reference to fuse_conn + */ +void fuse_conn_put(struct fuse_conn *fc); + +dev_t fuse_conn_get_id(struct fuse_conn *fc); + void fuse_end_polls(struct fuse_conn *fc); int fuse_notify(struct fuse_conn *fc, enum fuse_notify_code code, unsigned int size, struct fuse_copy_state *cs); +int fuse_backing_open(struct fuse_conn *fc, struct fuse_backing_map *map); +int fuse_backing_close(struct fuse_conn *fc, int backing_id); + int fuse_copy_one(struct fuse_copy_state *cs, void *val, unsigned size); int fuse_copy_folio(struct fuse_copy_state *cs, struct folio **foliop, unsigned offset, unsigned count, int zeroing); |
