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
;
38 unsigned int ioctl_64bit
: 1;
44 fuse_interrupt_func_t func
;
48 struct fuse_req
*next
;
49 struct fuse_req
*prev
;
52 struct fuse_notify_req
{
54 void (*reply
)(struct fuse_notify_req
*, fuse_req_t
, fuse_ino_t
,
55 const void *, const struct fuse_buf
*);
56 struct fuse_notify_req
*next
;
57 struct fuse_notify_req
*prev
;
64 int no_remote_posix_lock
;
74 int no_auto_inval_data
;
76 int no_readdirplus_auto
;
80 int no_writeback_cache
;
81 struct fuse_lowlevel_ops op
;
83 struct cuse_data
*cuse_data
;
86 struct fuse_conn_info conn
;
88 struct fuse_req interrupts
;
91 pthread_key_t pipe_key
;
92 int broken_splice_nonblock
;
94 struct fuse_notify_req notify_list
;
101 * Filesystem modules are registered with the FUSE_REGISTER_MODULE()
107 fuse_module_factory_t factory
;
108 struct fuse_module
*next
;
109 struct fusemod_so
*so
;
113 int fuse_chan_clearfd(struct fuse_chan
*ch
);
114 void fuse_chan_close(struct fuse_chan
*ch
);
117 * Create a new session
119 * @return new session object, or NULL on failure
121 struct fuse_session
*fuse_session_new(void);
124 * Create a new channel
126 * @param op channel operations
127 * @param fd file descriptor of the channel
128 * @return the new channel object, or NULL on failure
130 struct fuse_chan
*fuse_chan_new(int fd
);
133 * Query the session to which this channel is assigned
135 * @param ch the channel
136 * @return the session, or NULL if the channel is not assigned
138 struct fuse_session
*fuse_chan_session(struct fuse_chan
*ch
);
140 void fuse_kern_unmount(const char *mountpoint
, int fd
);
141 int fuse_kern_mount(const char *mountpoint
, struct fuse_args
*args
);
143 int fuse_send_reply_iov_nofree(fuse_req_t req
, int error
, struct iovec
*iov
,
145 void fuse_free_req(fuse_req_t req
);
147 void cuse_lowlevel_init(fuse_req_t req
, fuse_ino_t nodeide
, const void *inarg
);
149 int fuse_start_thread(pthread_t
*thread_id
, void *(*func
)(void *), void *arg
);