X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Ffuse%2Ffuse_i.h;h=145098056ca6556749f12668eaead0006598cf3e;hb=64c6d8ed4c55f0a99b1b81558851da80c8d58244;hp=e824a09d3151e93125e17dcd3b317b44ddbf7ddd;hpb=9ba7cbba100bdaca7316d71d6c6298e61191f8b2;p=linux-2.6 diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index e824a09d31..145098056c 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h @@ -120,6 +120,8 @@ enum fuse_req_state { FUSE_REQ_FINISHED }; +struct fuse_conn; + /** * A request to the client */ @@ -186,6 +188,9 @@ struct fuse_req { /** File used in the request (or NULL) */ struct file *file; + + /** Request completion callback */ + void (*end)(struct fuse_conn *, struct fuse_req *); }; /** @@ -196,9 +201,6 @@ struct fuse_req { * unmounted. */ struct fuse_conn { - /** Reference count */ - int count; - /** The user id for this mount */ uid_t user_id; @@ -249,8 +251,8 @@ struct fuse_conn { /** Mount is active */ unsigned mounted : 1; - /** Connection established, cleared on umount and device - release */ + /** Connection established, cleared on umount, connection + abort and device release */ unsigned connected : 1; /** Connection failed (version mismatch) */ @@ -283,11 +285,17 @@ struct fuse_conn { /** Is create not implemented by fs? */ unsigned no_create : 1; + /** The number of requests waiting for completion */ + atomic_t num_waiting; + /** Negotiated minor version */ unsigned minor; /** Backing dev info */ struct backing_dev_info bdi; + + /** kobject */ + struct kobject kobj; }; static inline struct fuse_conn *get_fuse_conn_super(struct super_block *sb) @@ -300,6 +308,11 @@ static inline struct fuse_conn *get_fuse_conn(struct inode *inode) return get_fuse_conn_super(inode->i_sb); } +static inline struct fuse_conn *get_fuse_conn_kobj(struct kobject *obj) +{ + return container_of(obj, struct fuse_conn, kobj); +} + static inline struct fuse_inode *get_fuse_inode(struct inode *inode) { return container_of(inode, struct fuse_inode, inode); @@ -399,12 +412,6 @@ void fuse_init_symlink(struct inode *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 - */ -void fuse_release_conn(struct fuse_conn *fc); - /** * Initialize the client device */ @@ -461,6 +468,9 @@ void request_send_background(struct fuse_conn *fc, struct fuse_req *req); */ void fuse_release_background(struct fuse_req *req); +/* Abort all requests */ +void fuse_abort_conn(struct fuse_conn *fc); + /** * Get the attributes of a file */