summaryrefslogtreecommitdiff
path: root/fs/fuse/fuse_i.h
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2005-09-09 13:10:28 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 14:03:45 -0700
commite5e5558e923f35839108a12718494ecb73fb782f (patch)
treec410d6826e9df13f7ea9e382a26589b66ec0989c /fs/fuse/fuse_i.h
parent334f485df85ac7736ebe14940bf0a059c5f26d7d (diff)
downloadlwn-e5e5558e923f35839108a12718494ecb73fb782f.tar.gz
lwn-e5e5558e923f35839108a12718494ecb73fb782f.zip
[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 {
* and kernel */
u64 nodeid;
+ /** The request used for sending the FORGET message */
+ struct fuse_req *forget_req;
+
/** Time in jiffies until the file attributes are valid */
unsigned long i_time;
};
@@ -129,6 +132,7 @@ struct fuse_req {
/** Data for asynchronous requests */
union {
+ struct fuse_forget_in forget_in;
struct fuse_init_in_out init_in_out;
} misc;
@@ -197,6 +201,11 @@ struct fuse_conn {
struct backing_dev_info bdi;
};
+struct fuse_getdir_out_i {
+ int fd;
+ void *file; /* Used by kernel only */
+};
+
static inline struct fuse_conn **get_fuse_conn_super_p(struct super_block *sb)
{
return (struct fuse_conn **) &sb->s_fs_info;
@@ -240,6 +249,38 @@ extern struct file_operations fuse_dev_operations;
extern spinlock_t fuse_lock;
/**
+ * Get a filled in inode
+ */
+struct inode *fuse_iget(struct super_block *sb, unsigned long nodeid,
+ int generation, struct fuse_attr *attr, int version);
+
+/**
+ * Send FORGET command
+ */
+void fuse_send_forget(struct fuse_conn *fc, struct fuse_req *req,
+ unsigned long nodeid, int version);
+
+/**
+ * Initialise inode operations on regular files and special files
+ */
+void fuse_init_common(struct inode *inode);
+
+/**
+ * Initialise inode and file operations on a directory
+ */
+void fuse_init_dir(struct inode *inode);
+
+/**
+ * Initialise inode operations on a symlink
+ */
+void fuse_init_symlink(struct inode *inode);
+
+/**
+ * Change attributes of an inode
+ */
+void fuse_change_attributes(struct inode *inode, struct fuse_attr *attr);
+
+/**
* Check if the connection can be released, and if yes, then free the
* connection structure
*/
@@ -307,6 +348,16 @@ void request_send_noreply(struct fuse_conn *fc, struct fuse_req *req);
void request_send_background(struct fuse_conn *fc, struct fuse_req *req);
/**
+ * Get the attributes of a file
+ */
+int fuse_do_getattr(struct inode *inode);
+
+/**
+ * Invalidate inode attributes
+ */
+void fuse_invalidate_attr(struct inode *inode);
+
+/**
* Send the INIT message
*/
void fuse_send_init(struct fuse_conn *fc);