aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ceph
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2016-04-28 10:07:26 -0400
committerIlya Dryomov <idryomov@gmail.com>2016-05-25 19:14:03 -0400
commit5aea3dcd50215fa9563270251ad7323e2f2490ee (patch)
tree1bcaaf4d5ff7b443c3776af771b228a5fad903b0 /include/linux/ceph
parent9dd2845ccb40452d4ac943231ea34aade4a02c68 (diff)
libceph: a major OSD client update
This is a major sync up, up to ~Jewel. The highlights are: - per-session request trees (vs a global per-client tree) - per-session locking (vs a global per-client rwlock) - homeless OSD session - no ad-hoc global per-client lists - support for pool quotas - foundation for watch/notify v2 support - foundation for map check (pool deletion detection) support The switchover is incomplete: lingering requests can be setup and teared down but aren't ever reestablished. This functionality is restored with the introduction of the new lingering infrastructure (ceph_osd_linger_request, linger_work, etc) in a later commit. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'include/linux/ceph')
-rw-r--r--include/linux/ceph/osd_client.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
index 486d681694c4..342f22f1f040 100644
--- a/include/linux/ceph/osd_client.h
+++ b/include/linux/ceph/osd_client.h
@@ -33,12 +33,13 @@ struct ceph_osd {
33 int o_incarnation; 33 int o_incarnation;
34 struct rb_node o_node; 34 struct rb_node o_node;
35 struct ceph_connection o_con; 35 struct ceph_connection o_con;
36 struct list_head o_requests; 36 struct rb_root o_requests;
37 struct list_head o_linger_requests; 37 struct list_head o_linger_requests;
38 struct list_head o_osd_lru; 38 struct list_head o_osd_lru;
39 struct ceph_auth_handshake o_auth; 39 struct ceph_auth_handshake o_auth;
40 unsigned long lru_ttl; 40 unsigned long lru_ttl;
41 struct list_head o_keepalive_item; 41 struct list_head o_keepalive_item;
42 struct mutex lock;
42}; 43};
43 44
44#define CEPH_OSD_SLAB_OPS 2 45#define CEPH_OSD_SLAB_OPS 2
@@ -144,8 +145,6 @@ struct ceph_osd_request_target {
144struct ceph_osd_request { 145struct ceph_osd_request {
145 u64 r_tid; /* unique for this client */ 146 u64 r_tid; /* unique for this client */
146 struct rb_node r_node; 147 struct rb_node r_node;
147 struct list_head r_req_lru_item;
148 struct list_head r_osd_item;
149 struct list_head r_linger_item; 148 struct list_head r_linger_item;
150 struct list_head r_linger_osd_item; 149 struct list_head r_linger_osd_item;
151 struct ceph_osd *r_osd; 150 struct ceph_osd *r_osd;
@@ -219,19 +218,16 @@ struct ceph_osd_client {
219 struct ceph_client *client; 218 struct ceph_client *client;
220 219
221 struct ceph_osdmap *osdmap; /* current map */ 220 struct ceph_osdmap *osdmap; /* current map */
222 struct rw_semaphore map_sem; 221 struct rw_semaphore lock;
223 222
224 struct mutex request_mutex;
225 struct rb_root osds; /* osds */ 223 struct rb_root osds; /* osds */
226 struct list_head osd_lru; /* idle osds */ 224 struct list_head osd_lru; /* idle osds */
227 spinlock_t osd_lru_lock; 225 spinlock_t osd_lru_lock;
228 u64 last_tid; /* tid of last request */
229 struct rb_root requests; /* pending requests */
230 struct list_head req_lru; /* in-flight lru */
231 struct list_head req_unsent; /* unsent/need-resend queue */
232 struct list_head req_notarget; /* map to no osd */
233 struct list_head req_linger; /* lingering requests */ 226 struct list_head req_linger; /* lingering requests */
234 int num_requests; 227 struct ceph_osd homeless_osd;
228 atomic64_t last_tid; /* tid of last request */
229 atomic_t num_requests;
230 atomic_t num_homeless;
235 struct delayed_work timeout_work; 231 struct delayed_work timeout_work;
236 struct delayed_work osds_timeout_work; 232 struct delayed_work osds_timeout_work;
237#ifdef CONFIG_DEBUG_FS 233#ifdef CONFIG_DEBUG_FS