Commit 4609245e authored by Ilya Dryomov's avatar Ilya Dryomov

libceph: pool deletion detection

This adds the "map check" infrastructure for sending osdmap version
checks on CALC_TARGET_POOL_DNE and completing in-flight requests with
-ENOENT if the target pool doesn't exist or has just been deleted.
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent d0b19705
...@@ -151,6 +151,7 @@ struct ceph_osd_request_target { ...@@ -151,6 +151,7 @@ struct ceph_osd_request_target {
struct ceph_osd_request { struct ceph_osd_request {
u64 r_tid; /* unique for this client */ u64 r_tid; /* unique for this client */
struct rb_node r_node; struct rb_node r_node;
struct rb_node r_mc_node; /* map check */
struct ceph_osd *r_osd; struct ceph_osd *r_osd;
struct ceph_osd_request_target r_t; struct ceph_osd_request_target r_t;
...@@ -191,6 +192,7 @@ struct ceph_osd_request { ...@@ -191,6 +192,7 @@ struct ceph_osd_request {
int r_attempts; int r_attempts;
struct ceph_eversion r_replay_version; /* aka reassert_version */ struct ceph_eversion r_replay_version; /* aka reassert_version */
u32 r_last_force_resend; u32 r_last_force_resend;
u32 r_map_dne_bound;
struct ceph_osd_req_op r_ops[]; struct ceph_osd_req_op r_ops[];
}; };
...@@ -218,6 +220,7 @@ struct ceph_osd_linger_request { ...@@ -218,6 +220,7 @@ struct ceph_osd_linger_request {
struct ceph_osd_request_target t; struct ceph_osd_request_target t;
u32 last_force_resend; u32 last_force_resend;
u32 map_dne_bound;
struct timespec mtime; struct timespec mtime;
...@@ -225,6 +228,7 @@ struct ceph_osd_linger_request { ...@@ -225,6 +228,7 @@ struct ceph_osd_linger_request {
struct mutex lock; struct mutex lock;
struct rb_node node; /* osd */ struct rb_node node; /* osd */
struct rb_node osdc_node; /* osdc */ struct rb_node osdc_node; /* osdc */
struct rb_node mc_node; /* map check */
struct list_head scan_item; struct list_head scan_item;
struct completion reg_commit_wait; struct completion reg_commit_wait;
...@@ -257,6 +261,8 @@ struct ceph_osd_client { ...@@ -257,6 +261,8 @@ struct ceph_osd_client {
atomic64_t last_tid; /* tid of last request */ atomic64_t last_tid; /* tid of last request */
u64 last_linger_id; u64 last_linger_id;
struct rb_root linger_requests; /* lingering requests */ 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_requests;
atomic_t num_homeless; atomic_t num_homeless;
struct delayed_work timeout_work; struct delayed_work timeout_work;
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment