diff options
Diffstat (limited to 'fs/ceph/mds_client.h')
| -rw-r--r-- | fs/ceph/mds_client.h | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h index 952410c60d09..ab7e89f5e344 100644 --- a/fs/ceph/mds_client.h +++ b/fs/ceph/mds_client.h | |||
| @@ -151,6 +151,7 @@ typedef void (*ceph_mds_request_callback_t) (struct ceph_mds_client *mdsc, | |||
| 151 | struct ceph_mds_request { | 151 | struct ceph_mds_request { |
| 152 | u64 r_tid; /* transaction id */ | 152 | u64 r_tid; /* transaction id */ |
| 153 | struct rb_node r_node; | 153 | struct rb_node r_node; |
| 154 | struct ceph_mds_client *r_mdsc; | ||
| 154 | 155 | ||
| 155 | int r_op; /* mds op code */ | 156 | int r_op; /* mds op code */ |
| 156 | int r_mds; | 157 | int r_mds; |
| @@ -207,8 +208,8 @@ struct ceph_mds_request { | |||
| 207 | 208 | ||
| 208 | int r_attempts; /* resend attempts */ | 209 | int r_attempts; /* resend attempts */ |
| 209 | int r_num_fwd; /* number of forward attempts */ | 210 | int r_num_fwd; /* number of forward attempts */ |
| 210 | int r_num_stale; | ||
| 211 | int r_resend_mds; /* mds to resend to next, if any*/ | 211 | int r_resend_mds; /* mds to resend to next, if any*/ |
| 212 | u32 r_sent_on_mseq; /* cap mseq request was sent at*/ | ||
| 212 | 213 | ||
| 213 | struct kref r_kref; | 214 | struct kref r_kref; |
| 214 | struct list_head r_wait; | 215 | struct list_head r_wait; |
| @@ -267,6 +268,27 @@ struct ceph_mds_client { | |||
| 267 | spinlock_t cap_dirty_lock; /* protects above items */ | 268 | spinlock_t cap_dirty_lock; /* protects above items */ |
| 268 | wait_queue_head_t cap_flushing_wq; | 269 | wait_queue_head_t cap_flushing_wq; |
| 269 | 270 | ||
| 271 | /* | ||
| 272 | * Cap reservations | ||
| 273 | * | ||
| 274 | * Maintain a global pool of preallocated struct ceph_caps, referenced | ||
| 275 | * by struct ceph_caps_reservations. This ensures that we preallocate | ||
| 276 | * memory needed to successfully process an MDS response. (If an MDS | ||
| 277 | * sends us cap information and we fail to process it, we will have | ||
| 278 | * problems due to the client and MDS being out of sync.) | ||
| 279 | * | ||
| 280 | * Reservations are 'owned' by a ceph_cap_reservation context. | ||
| 281 | */ | ||
| 282 | spinlock_t caps_list_lock; | ||
| 283 | struct list_head caps_list; /* unused (reserved or | ||
| 284 | unreserved) */ | ||
| 285 | int caps_total_count; /* total caps allocated */ | ||
| 286 | int caps_use_count; /* in use */ | ||
| 287 | int caps_reserve_count; /* unused, reserved */ | ||
| 288 | int caps_avail_count; /* unused, unreserved */ | ||
| 289 | int caps_min_count; /* keep at least this many | ||
| 290 | (unreserved) */ | ||
| 291 | |||
| 270 | #ifdef CONFIG_DEBUG_FS | 292 | #ifdef CONFIG_DEBUG_FS |
| 271 | struct dentry *debugfs_file; | 293 | struct dentry *debugfs_file; |
| 272 | #endif | 294 | #endif |
| @@ -324,8 +346,7 @@ static inline void ceph_mdsc_put_request(struct ceph_mds_request *req) | |||
| 324 | } | 346 | } |
| 325 | 347 | ||
| 326 | extern int ceph_add_cap_releases(struct ceph_mds_client *mdsc, | 348 | extern int ceph_add_cap_releases(struct ceph_mds_client *mdsc, |
| 327 | struct ceph_mds_session *session, | 349 | struct ceph_mds_session *session); |
| 328 | int extra); | ||
| 329 | extern void ceph_send_cap_releases(struct ceph_mds_client *mdsc, | 350 | extern void ceph_send_cap_releases(struct ceph_mds_client *mdsc, |
| 330 | struct ceph_mds_session *session); | 351 | struct ceph_mds_session *session); |
| 331 | 352 | ||
| @@ -343,4 +364,7 @@ extern void ceph_mdsc_lease_send_msg(struct ceph_mds_session *session, | |||
| 343 | extern void ceph_mdsc_handle_map(struct ceph_mds_client *mdsc, | 364 | extern void ceph_mdsc_handle_map(struct ceph_mds_client *mdsc, |
| 344 | struct ceph_msg *msg); | 365 | struct ceph_msg *msg); |
| 345 | 366 | ||
| 367 | extern void ceph_mdsc_open_export_target_sessions(struct ceph_mds_client *mdsc, | ||
| 368 | struct ceph_mds_session *session); | ||
| 369 | |||
| 346 | #endif | 370 | #endif |
