aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ceph
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2016-04-28 10:07:27 -0400
committerIlya Dryomov <idryomov@gmail.com>2016-05-25 19:15:29 -0400
commit4609245e2670e3698b083bcd9cc69a65b2b6f9a6 (patch)
tree8cfbb1360b262359cabc839ab2e24762c1da21fb /include/linux/ceph
parentd0b19705e99939f5ae5aa9b57bfe41dd4777d951 (diff)
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: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'include/linux/ceph')
-rw-r--r--include/linux/ceph/osd_client.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
index 2ae7cfd82ec9..3e7bf72e4078 100644
--- a/include/linux/ceph/osd_client.h
+++ b/include/linux/ceph/osd_client.h
@@ -151,6 +151,7 @@ struct ceph_osd_request_target {
151struct ceph_osd_request { 151struct ceph_osd_request {
152 u64 r_tid; /* unique for this client */ 152 u64 r_tid; /* unique for this client */
153 struct rb_node r_node; 153 struct rb_node r_node;
154 struct rb_node r_mc_node; /* map check */
154 struct ceph_osd *r_osd; 155 struct ceph_osd *r_osd;
155 156
156 struct ceph_osd_request_target r_t; 157 struct ceph_osd_request_target r_t;
@@ -191,6 +192,7 @@ struct ceph_osd_request {
191 int r_attempts; 192 int r_attempts;
192 struct ceph_eversion r_replay_version; /* aka reassert_version */ 193 struct ceph_eversion r_replay_version; /* aka reassert_version */
193 u32 r_last_force_resend; 194 u32 r_last_force_resend;
195 u32 r_map_dne_bound;
194 196
195 struct ceph_osd_req_op r_ops[]; 197 struct ceph_osd_req_op r_ops[];
196}; 198};
@@ -218,6 +220,7 @@ struct ceph_osd_linger_request {
218 220
219 struct ceph_osd_request_target t; 221 struct ceph_osd_request_target t;
220 u32 last_force_resend; 222 u32 last_force_resend;
223 u32 map_dne_bound;
221 224
222 struct timespec mtime; 225 struct timespec mtime;
223 226
@@ -225,6 +228,7 @@ struct ceph_osd_linger_request {
225 struct mutex lock; 228 struct mutex lock;
226 struct rb_node node; /* osd */ 229 struct rb_node node; /* osd */
227 struct rb_node osdc_node; /* osdc */ 230 struct rb_node osdc_node; /* osdc */
231 struct rb_node mc_node; /* map check */
228 struct list_head scan_item; 232 struct list_head scan_item;
229 233
230 struct completion reg_commit_wait; 234 struct completion reg_commit_wait;
@@ -257,6 +261,8 @@ struct ceph_osd_client {
257 atomic64_t last_tid; /* tid of last request */ 261 atomic64_t last_tid; /* tid of last request */
258 u64 last_linger_id; 262 u64 last_linger_id;
259 struct rb_root linger_requests; /* lingering requests */ 263 struct rb_root linger_requests; /* lingering requests */
264 struct rb_root map_checks;
265 struct rb_root linger_map_checks;
260 atomic_t num_requests; 266 atomic_t num_requests;
261 atomic_t num_homeless; 267 atomic_t num_homeless;
262 struct delayed_work timeout_work; 268 struct delayed_work timeout_work;