2 FUSE: Filesystem in Userspace
3 Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu>
5 This program can be distributed under the terms of the GNU LGPLv2.
6 See the file COPYING.LIB
10 #include "fuse_lowlevel.h"
24 struct fuse_session
*se
;
40 unsigned int ioctl_64bit
: 1;
46 fuse_interrupt_func_t func
;
50 struct fuse_req
*next
;
51 struct fuse_req
*prev
;
54 struct fuse_notify_req
{
56 void (*reply
)(struct fuse_notify_req
*, fuse_req_t
, fuse_ino_t
,
57 const void *, const struct fuse_buf
*);
58 struct fuse_notify_req
*next
;
59 struct fuse_notify_req
*prev
;
66 int no_remote_posix_lock
;
76 int no_auto_inval_data
;
78 int no_readdirplus_auto
;
82 int no_writeback_cache
;
83 struct fuse_lowlevel_ops op
;
85 struct cuse_data
*cuse_data
;
88 struct fuse_conn_info conn
;
90 struct fuse_req interrupts
;
93 pthread_key_t pipe_key
;
94 int broken_splice_nonblock
;
96 struct fuse_notify_req notify_list
;
103 * Filesystem modules are registered with the FUSE_REGISTER_MODULE()
109 fuse_module_factory_t factory
;
110 struct fuse_module
*next
;
111 struct fusemod_so
*so
;
115 int fuse_chan_clearfd(struct fuse_chan
*ch
);
116 void fuse_chan_close(struct fuse_chan
*ch
);
119 * Create a new session
121 * @return new session object, or NULL on failure
123 struct fuse_session
*fuse_session_new(void);
126 * Create a new channel
128 * @param op channel operations
129 * @param fd file descriptor of the channel
130 * @return the new channel object, or NULL on failure
132 struct fuse_chan
*fuse_chan_new(int fd
);
135 * Query the session to which this channel is assigned
137 * @param ch the channel
138 * @return the session, or NULL if the channel is not assigned
140 struct fuse_session
*fuse_chan_session(struct fuse_chan
*ch
);
142 void fuse_kern_unmount(const char *mountpoint
, int fd
);
143 int fuse_kern_mount(const char *mountpoint
, struct fuse_args
*args
);
145 int fuse_send_reply_iov_nofree(fuse_req_t req
, int error
, struct iovec
*iov
,
147 void fuse_free_req(fuse_req_t req
);
149 void cuse_lowlevel_init(fuse_req_t req
, fuse_ino_t nodeide
, const void *inarg
);
151 int fuse_start_thread(pthread_t
*thread_id
, void *(*func
)(void *), void *arg
);