drm/radeon: fix PM on non-vram cards.
[safe/jmp/linux-2.6] / fs / ceph / mds_client.h
index b1c2025..d9936c4 100644 (file)
@@ -5,7 +5,7 @@
 #include <linux/kref.h>
 #include <linux/list.h>
 #include <linux/mutex.h>
-#include <linux/radix-tree.h>
+#include <linux/rbtree.h>
 #include <linux/spinlock.h>
 
 #include "types.h"
@@ -114,7 +114,7 @@ struct ceph_mds_session {
        int               s_num_cap_releases;
        struct list_head  s_cap_releases; /* waiting cap_release messages */
        struct list_head  s_cap_releases_done; /* ready to send */
-       bool              s_iterating_caps;
+       struct ceph_cap  *s_cap_iterator;
 
        /* protected by mutex */
        struct list_head  s_cap_flushing;     /* inodes w/ flushing caps */
@@ -150,6 +150,7 @@ typedef void (*ceph_mds_request_callback_t) (struct ceph_mds_client *mdsc,
  */
 struct ceph_mds_request {
        u64 r_tid;                   /* transaction id */
+       struct rb_node r_node;
 
        int r_op;                    /* mds op code */
        int r_mds;
@@ -164,6 +165,8 @@ struct ceph_mds_request {
        struct inode *r_locked_dir; /* dir (if any) i_mutex locked by vfs */
        struct inode *r_target_inode;       /* resulting inode */
 
+       struct mutex r_fill_mutex;
+
        union ceph_mds_request_args r_args;
        int r_fmode;        /* file mode, if expecting cap */
 
@@ -188,6 +191,7 @@ struct ceph_mds_request {
        struct ceph_msg  *r_reply;
        struct ceph_mds_reply_info_parsed r_reply_info;
        int r_err;
+       bool r_aborted;
 
        unsigned long r_timeout;  /* optional.  jiffies */
        unsigned long r_started;  /* start time to measure timeout against */
@@ -211,7 +215,7 @@ struct ceph_mds_request {
        struct completion r_safe_completion;
        ceph_mds_request_callback_t r_callback;
        struct list_head  r_unsafe_item;  /* per-session unsafe list item */
-       bool              r_got_unsafe, r_got_safe;
+       bool              r_got_unsafe, r_got_safe, r_got_result;
 
        bool              r_did_prepopulate;
        u32               r_readdir_offset;
@@ -243,12 +247,12 @@ struct ceph_mds_client {
         * should be destroyed.
         */
        struct rw_semaphore     snap_rwsem;
-       struct radix_tree_root  snap_realms;
+       struct rb_root          snap_realms;
        struct list_head        snap_empty;
        spinlock_t              snap_empty_lock;  /* protect snap_empty */
 
        u64                    last_tid;      /* most recent mds request */
-       struct radix_tree_root request_tree;  /* pending mds requests */
+       struct rb_root         request_tree;  /* pending mds requests */
        struct delayed_work    delayed_work;  /* delayed work */
        unsigned long    last_renew_caps;  /* last time we renewed our caps */
        struct list_head cap_delay_list;   /* caps with delayed release */
@@ -299,6 +303,8 @@ extern void ceph_mdsc_lease_release(struct ceph_mds_client *mdsc,
                                    struct inode *inode,
                                    struct dentry *dn, int mask);
 
+extern void ceph_invalidate_dir_request(struct ceph_mds_request *req);
+
 extern struct ceph_mds_request *
 ceph_mdsc_create_request(struct ceph_mds_client *mdsc, int op, int mode);
 extern void ceph_mdsc_submit_request(struct ceph_mds_client *mdsc,