]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/linux/ceph/osd_client.h
Merge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
[karo-tx-linux.git] / include / linux / ceph / osd_client.h
index 2ae7cfd82ec9a57e0145ae4840ba8d0e76bf2eb9..1b3b6e15539238f8d88696762548de9d786c4349 100644 (file)
@@ -151,6 +151,7 @@ struct ceph_osd_request_target {
 struct ceph_osd_request {
        u64             r_tid;              /* unique for this client */
        struct rb_node  r_node;
+       struct rb_node  r_mc_node;          /* map check */
        struct ceph_osd *r_osd;
 
        struct ceph_osd_request_target r_t;
@@ -191,6 +192,7 @@ struct ceph_osd_request {
        int r_attempts;
        struct ceph_eversion r_replay_version; /* aka reassert_version */
        u32 r_last_force_resend;
+       u32 r_map_dne_bound;
 
        struct ceph_osd_req_op r_ops[];
 };
@@ -218,6 +220,7 @@ struct ceph_osd_linger_request {
 
        struct ceph_osd_request_target t;
        u32 last_force_resend;
+       u32 map_dne_bound;
 
        struct timespec mtime;
 
@@ -225,6 +228,7 @@ struct ceph_osd_linger_request {
        struct mutex lock;
        struct rb_node node;            /* osd */
        struct rb_node osdc_node;       /* osdc */
+       struct rb_node mc_node;         /* map check */
        struct list_head scan_item;
 
        struct completion reg_commit_wait;
@@ -257,6 +261,8 @@ struct ceph_osd_client {
        atomic64_t             last_tid;      /* tid of last request */
        u64                    last_linger_id;
        struct rb_root         linger_requests; /* lingering requests */
+       struct rb_root         map_checks;
+       struct rb_root         linger_map_checks;
        atomic_t               num_requests;
        atomic_t               num_homeless;
        struct delayed_work    timeout_work;
@@ -273,6 +279,11 @@ struct ceph_osd_client {
        struct workqueue_struct *notify_wq;
 };
 
+static inline bool ceph_osdmap_flag(struct ceph_osd_client *osdc, int flag)
+{
+       return osdc->osdmap->flags & flag;
+}
+
 extern int ceph_osdc_setup(void);
 extern void ceph_osdc_cleanup(void);
 
@@ -375,6 +386,7 @@ extern int ceph_osdc_wait_request(struct ceph_osd_client *osdc,
 extern void ceph_osdc_sync(struct ceph_osd_client *osdc);
 
 extern void ceph_osdc_flush_notifies(struct ceph_osd_client *osdc);
+void ceph_osdc_maybe_request_map(struct ceph_osd_client *osdc);
 
 extern int ceph_osdc_readpages(struct ceph_osd_client *osdc,
                               struct ceph_vino vino,