aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse/fuse_i.h
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2005-09-09 16:10:28 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 17:03:45 -0400
commite5e5558e923f35839108a12718494ecb73fb782f (patch)
treec410d6826e9df13f7ea9e382a26589b66ec0989c /fs/fuse/fuse_i.h
parent334f485df85ac7736ebe14940bf0a059c5f26d7d (diff)
[PATCH] FUSE - read-only operations
This patch adds the read-only filesystem operations of FUSE. This contains the following files: o dir.c - directory, symlink and file-inode operations The following operations are added: o lookup o getattr o readlink o follow_link o directory open o readdir o directory release o permission o dentry revalidate o statfs Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/fuse/fuse_i.h')
-rw-r--r--fs/fuse/fuse_i.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index 50ad6a0c39bf..8d91e1492f96 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -30,6 +30,9 @@ struct fuse_inode {
30 * and kernel */ 30 * and kernel */
31 u64 nodeid; 31 u64 nodeid;
32 32
33 /** The request used for sending the FORGET message */
34 struct fuse_req *forget_req;
35
33 /** Time in jiffies until the file attributes are valid */ 36 /** Time in jiffies until the file attributes are valid */
34 unsigned long i_time; 37 unsigned long i_time;
35}; 38};
@@ -129,6 +132,7 @@ struct fuse_req {
129 132
130 /** Data for asynchronous requests */ 133 /** Data for asynchronous requests */
131 union { 134 union {
135 struct fuse_forget_in forget_in;
132 struct fuse_init_in_out init_in_out; 136 struct fuse_init_in_out init_in_out;
133 } misc; 137 } misc;
134 138
@@ -197,6 +201,11 @@ struct fuse_conn {
197 struct backing_dev_info bdi; 201 struct backing_dev_info bdi;
198}; 202};
199 203
204struct fuse_getdir_out_i {
205 int fd;
206 void *file; /* Used by kernel only */
207};
208
200static inline struct fuse_conn **get_fuse_conn_super_p(struct super_block *sb) 209static inline struct fuse_conn **get_fuse_conn_super_p(struct super_block *sb)
201{ 210{
202 return (struct fuse_conn **) &sb->s_fs_info; 211 return (struct fuse_conn **) &sb->s_fs_info;
@@ -240,6 +249,38 @@ extern struct file_operations fuse_dev_operations;
240extern spinlock_t fuse_lock; 249extern spinlock_t fuse_lock;
241 250
242/** 251/**
252 * Get a filled in inode
253 */
254struct inode *fuse_iget(struct super_block *sb, unsigned long nodeid,
255 int generation, struct fuse_attr *attr, int version);
256
257/**
258 * Send FORGET command
259 */
260void fuse_send_forget(struct fuse_conn *fc, struct fuse_req *req,
261 unsigned long nodeid, int version);
262
263/**
264 * Initialise inode operations on regular files and special files
265 */
266void fuse_init_common(struct inode *inode);
267
268/**
269 * Initialise inode and file operations on a directory
270 */
271void fuse_init_dir(struct inode *inode);
272
273/**
274 * Initialise inode operations on a symlink
275 */
276void fuse_init_symlink(struct inode *inode);
277
278/**
279 * Change attributes of an inode
280 */
281void fuse_change_attributes(struct inode *inode, struct fuse_attr *attr);
282
283/**
243 * Check if the connection can be released, and if yes, then free the 284 * Check if the connection can be released, and if yes, then free the
244 * connection structure 285 * connection structure
245 */ 286 */
@@ -307,6 +348,16 @@ void request_send_noreply(struct fuse_conn *fc, struct fuse_req *req);
307void request_send_background(struct fuse_conn *fc, struct fuse_req *req); 348void request_send_background(struct fuse_conn *fc, struct fuse_req *req);
308 349
309/** 350/**
351 * Get the attributes of a file
352 */
353int fuse_do_getattr(struct inode *inode);
354
355/**
356 * Invalidate inode attributes
357 */
358void fuse_invalidate_attr(struct inode *inode);
359
360/**
310 * Send the INIT message 361 * Send the INIT message
311 */ 362 */
312void fuse_send_init(struct fuse_conn *fc); 363void fuse_send_init(struct fuse_conn *fc);