Lines Matching refs:osdc

29 static void __send_queued(struct ceph_osd_client *osdc);
30 static int __reset_osd(struct ceph_osd_client *osdc, struct ceph_osd *osd);
31 static void __register_request(struct ceph_osd_client *osdc,
33 static void __unregister_request(struct ceph_osd_client *osdc,
35 static void __unregister_linger_request(struct ceph_osd_client *osdc,
38 static void __send_request(struct ceph_osd_client *osdc,
362 struct ceph_osd_request *ceph_osdc_alloc_request(struct ceph_osd_client *osdc, in ceph_osdc_alloc_request() argument
386 req = mempool_alloc(osdc->req_mempool, gfp_flags); in ceph_osdc_alloc_request()
394 req->r_osdc = osdc; in ceph_osdc_alloc_request()
413 msg = ceph_msgpool_get(&osdc->msgpool_op_reply, 0); in ceph_osdc_alloc_request()
425 msg = ceph_msgpool_get(&osdc->msgpool_op, 0); in ceph_osdc_alloc_request()
769 struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc, in ceph_osdc_new_request() argument
790 req = ceph_osdc_alloc_request(osdc, snapc, num_ops, use_mempool, in ceph_osdc_new_request()
835 static void __insert_request(struct ceph_osd_client *osdc, in __insert_request() argument
838 struct rb_node **p = &osdc->requests.rb_node; in __insert_request()
854 rb_insert_color(&new->r_node, &osdc->requests); in __insert_request()
857 static struct ceph_osd_request *__lookup_request(struct ceph_osd_client *osdc, in __lookup_request() argument
861 struct rb_node *n = osdc->requests.rb_node; in __lookup_request()
876 __lookup_request_ge(struct ceph_osd_client *osdc, in __lookup_request_ge() argument
880 struct rb_node *n = osdc->requests.rb_node; in __lookup_request_ge()
899 struct ceph_osd_client *osdc = req->r_osdc; in __kick_linger_request() local
909 __unregister_linger_request(osdc, req); in __kick_linger_request()
911 __unregister_request(osdc, req); in __kick_linger_request()
912 __register_request(osdc, req); in __kick_linger_request()
931 static void __kick_osd_requests(struct ceph_osd_client *osdc, in __kick_osd_requests() argument
940 err = __reset_osd(osdc, osd); in __kick_osd_requests()
974 list_splice(&resend, &osdc->req_unsent); in __kick_osd_requests()
998 struct ceph_osd_client *osdc; in osd_reset() local
1003 osdc = osd->o_osdc; in osd_reset()
1004 down_read(&osdc->map_sem); in osd_reset()
1005 mutex_lock(&osdc->request_mutex); in osd_reset()
1006 __kick_osd_requests(osdc, osd); in osd_reset()
1007 __send_queued(osdc); in osd_reset()
1008 mutex_unlock(&osdc->request_mutex); in osd_reset()
1009 up_read(&osdc->map_sem); in osd_reset()
1015 static struct ceph_osd *create_osd(struct ceph_osd_client *osdc, int onum) in create_osd() argument
1024 osd->o_osdc = osdc; in create_osd()
1032 ceph_con_init(&osd->o_con, osd, &osd_con_ops, &osdc->client->msgr); in create_osd()
1066 static void __remove_osd(struct ceph_osd_client *osdc, struct ceph_osd *osd) in __remove_osd() argument
1073 rb_erase(&osd->o_node, &osdc->osds); in __remove_osd()
1077 static void remove_osd(struct ceph_osd_client *osdc, struct ceph_osd *osd) in remove_osd() argument
1083 __remove_osd(osdc, osd); in remove_osd()
1088 static void remove_all_osds(struct ceph_osd_client *osdc) in remove_all_osds() argument
1090 dout("%s %p\n", __func__, osdc); in remove_all_osds()
1091 mutex_lock(&osdc->request_mutex); in remove_all_osds()
1092 while (!RB_EMPTY_ROOT(&osdc->osds)) { in remove_all_osds()
1093 struct ceph_osd *osd = rb_entry(rb_first(&osdc->osds), in remove_all_osds()
1095 remove_osd(osdc, osd); in remove_all_osds()
1097 mutex_unlock(&osdc->request_mutex); in remove_all_osds()
1100 static void __move_osd_to_lru(struct ceph_osd_client *osdc, in __move_osd_to_lru() argument
1106 list_add_tail(&osd->o_osd_lru, &osdc->osd_lru); in __move_osd_to_lru()
1107 osd->lru_ttl = jiffies + osdc->client->options->osd_idle_ttl; in __move_osd_to_lru()
1110 static void maybe_move_osd_to_lru(struct ceph_osd_client *osdc, in maybe_move_osd_to_lru() argument
1117 __move_osd_to_lru(osdc, osd); in maybe_move_osd_to_lru()
1127 static void remove_old_osds(struct ceph_osd_client *osdc) in remove_old_osds() argument
1131 dout("__remove_old_osds %p\n", osdc); in remove_old_osds()
1132 mutex_lock(&osdc->request_mutex); in remove_old_osds()
1133 list_for_each_entry_safe(osd, nosd, &osdc->osd_lru, o_osd_lru) { in remove_old_osds()
1136 remove_osd(osdc, osd); in remove_old_osds()
1138 mutex_unlock(&osdc->request_mutex); in remove_old_osds()
1144 static int __reset_osd(struct ceph_osd_client *osdc, struct ceph_osd *osd) in __reset_osd() argument
1151 remove_osd(osdc, osd); in __reset_osd()
1155 peer_addr = &osdc->osdmap->osd_addr[osd->o_osd]; in __reset_osd()
1176 static void __insert_osd(struct ceph_osd_client *osdc, struct ceph_osd *new) in __insert_osd() argument
1178 struct rb_node **p = &osdc->osds.rb_node; in __insert_osd()
1195 rb_insert_color(&new->o_node, &osdc->osds); in __insert_osd()
1198 static struct ceph_osd *__lookup_osd(struct ceph_osd_client *osdc, int o) in __lookup_osd() argument
1201 struct rb_node *n = osdc->osds.rb_node; in __lookup_osd()
1215 static void __schedule_osd_timeout(struct ceph_osd_client *osdc) in __schedule_osd_timeout() argument
1217 schedule_delayed_work(&osdc->timeout_work, in __schedule_osd_timeout()
1218 osdc->client->options->osd_keepalive_timeout); in __schedule_osd_timeout()
1221 static void __cancel_osd_timeout(struct ceph_osd_client *osdc) in __cancel_osd_timeout() argument
1223 cancel_delayed_work(&osdc->timeout_work); in __cancel_osd_timeout()
1230 static void __register_request(struct ceph_osd_client *osdc, in __register_request() argument
1233 req->r_tid = ++osdc->last_tid; in __register_request()
1236 __insert_request(osdc, req); in __register_request()
1238 osdc->num_requests++; in __register_request()
1239 if (osdc->num_requests == 1) { in __register_request()
1241 __schedule_osd_timeout(osdc); in __register_request()
1248 static void __unregister_request(struct ceph_osd_client *osdc, in __unregister_request() argument
1258 rb_erase(&req->r_node, &osdc->requests); in __unregister_request()
1260 osdc->num_requests--; in __unregister_request()
1267 maybe_move_osd_to_lru(osdc, req->r_osd); in __unregister_request()
1275 if (osdc->num_requests == 0) { in __unregister_request()
1277 __cancel_osd_timeout(osdc); in __unregister_request()
1292 static void __register_linger_request(struct ceph_osd_client *osdc, in __register_linger_request() argument
1299 list_add_tail(&req->r_linger_item, &osdc->req_linger); in __register_linger_request()
1305 static void __unregister_linger_request(struct ceph_osd_client *osdc, in __unregister_linger_request() argument
1321 maybe_move_osd_to_lru(osdc, req->r_osd); in __unregister_linger_request()
1328 void ceph_osdc_set_request_linger(struct ceph_osd_client *osdc, in ceph_osdc_set_request_linger() argument
1344 static bool __req_should_be_paused(struct ceph_osd_client *osdc, in __req_should_be_paused() argument
1347 bool pauserd = ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_PAUSERD); in __req_should_be_paused()
1348 bool pausewr = ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_PAUSEWR) || in __req_should_be_paused()
1349 ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_FULL); in __req_should_be_paused()
1395 struct ceph_osd_client *osdc = req->r_osdc; in __enqueue_request() local
1403 list_move_tail(&req->r_req_lru_item, &osdc->req_unsent); in __enqueue_request()
1405 list_move_tail(&req->r_req_lru_item, &osdc->req_notarget); in __enqueue_request()
1419 static int __map_request(struct ceph_osd_client *osdc, in __map_request() argument
1430 err = __calc_request_pg(osdc->osdmap, req, &pgid); in __map_request()
1432 list_move(&req->r_req_lru_item, &osdc->req_notarget); in __map_request()
1437 num = ceph_calc_pg_acting(osdc->osdmap, pgid, acting, &o); in __map_request()
1442 req->r_paused = __req_should_be_paused(osdc, req); in __map_request()
1470 req->r_osd = __lookup_osd(osdc, o); in __map_request()
1473 req->r_osd = create_osd(osdc, o); in __map_request()
1475 list_move(&req->r_req_lru_item, &osdc->req_notarget); in __map_request()
1480 __insert_osd(osdc, req->r_osd); in __map_request()
1484 &osdc->osdmap->osd_addr[o]); in __map_request()
1497 static void __send_request(struct ceph_osd_client *osdc, in __send_request() argument
1507 put_unaligned_le32(osdc->osdmap->epoch, req->r_request_osdmap_epoch); in __send_request()
1518 list_move_tail(&req->r_req_lru_item, &osdc->req_lru); in __send_request()
1530 static void __send_queued(struct ceph_osd_client *osdc) in __send_queued() argument
1535 list_for_each_entry_safe(req, tmp, &osdc->req_unsent, r_req_lru_item) in __send_queued()
1536 __send_request(osdc, req); in __send_queued()
1542 static int __ceph_osdc_start_request(struct ceph_osd_client *osdc, in __ceph_osdc_start_request() argument
1548 __register_request(osdc, req); in __ceph_osdc_start_request()
1551 rc = __map_request(osdc, req, 0); in __ceph_osdc_start_request()
1558 __unregister_request(osdc, req); in __ceph_osdc_start_request()
1565 ceph_monc_request_next_osdmap(&osdc->client->monc); in __ceph_osdc_start_request()
1567 __send_queued(osdc); in __ceph_osdc_start_request()
1584 struct ceph_osd_client *osdc = in handle_timeout() local
1586 struct ceph_options *opts = osdc->client->options; in handle_timeout()
1591 down_read(&osdc->map_sem); in handle_timeout()
1593 ceph_monc_request_next_osdmap(&osdc->client->monc); in handle_timeout()
1595 mutex_lock(&osdc->request_mutex); in handle_timeout()
1603 list_for_each_entry(req, &osdc->req_lru, r_req_lru_item) { in handle_timeout()
1621 __schedule_osd_timeout(osdc); in handle_timeout()
1622 __send_queued(osdc); in handle_timeout()
1623 mutex_unlock(&osdc->request_mutex); in handle_timeout()
1624 up_read(&osdc->map_sem); in handle_timeout()
1629 struct ceph_osd_client *osdc = in handle_osds_timeout() local
1632 unsigned long delay = osdc->client->options->osd_idle_ttl / 4; in handle_osds_timeout()
1635 down_read(&osdc->map_sem); in handle_osds_timeout()
1636 remove_old_osds(osdc); in handle_osds_timeout()
1637 up_read(&osdc->map_sem); in handle_osds_timeout()
1639 schedule_delayed_work(&osdc->osds_timeout_work, in handle_osds_timeout()
1755 static void handle_reply(struct ceph_osd_client *osdc, struct ceph_msg *msg) in handle_reply() argument
1798 down_read(&osdc->map_sem); in handle_reply()
1799 mutex_lock(&osdc->request_mutex); in handle_reply()
1800 req = __lookup_request(osdc, tid); in handle_reply()
1854 __unregister_request(osdc, req); in handle_reply()
1866 err = __ceph_osdc_start_request(osdc, req, true); in handle_reply()
1893 __register_linger_request(osdc, req); in handle_reply()
1899 __unregister_request(osdc, req); in handle_reply()
1901 mutex_unlock(&osdc->request_mutex); in handle_reply()
1902 up_read(&osdc->map_sem); in handle_reply()
1925 mutex_unlock(&osdc->request_mutex); in handle_reply()
1926 up_read(&osdc->map_sem); in handle_reply()
1931 __unregister_request(osdc, req); in handle_reply()
1939 mutex_unlock(&osdc->request_mutex); in handle_reply()
1940 up_read(&osdc->map_sem); in handle_reply()
1947 static void reset_changed_osds(struct ceph_osd_client *osdc) in reset_changed_osds() argument
1951 dout("%s %p\n", __func__, osdc); in reset_changed_osds()
1952 for (p = rb_first(&osdc->osds); p; p = n) { in reset_changed_osds()
1956 if (!ceph_osd_is_up(osdc->osdmap, osd->o_osd) || in reset_changed_osds()
1958 ceph_osd_addr(osdc->osdmap, in reset_changed_osds()
1961 __reset_osd(osdc, osd); in reset_changed_osds()
1971 static void kick_requests(struct ceph_osd_client *osdc, bool force_resend, in kick_requests() argument
1982 mutex_lock(&osdc->request_mutex); in kick_requests()
1983 for (p = rb_first(&osdc->requests); p; ) { in kick_requests()
2000 __unregister_request(osdc, req); in kick_requests()
2001 __register_linger_request(osdc, req); in kick_requests()
2009 err = __map_request(osdc, req, force_resend_req); in kick_requests()
2025 list_for_each_entry_safe(req, nreq, &osdc->req_linger, in kick_requests()
2029 err = __map_request(osdc, req, in kick_requests()
2052 __register_request(osdc, req); in kick_requests()
2053 __unregister_linger_request(osdc, req); in kick_requests()
2056 reset_changed_osds(osdc); in kick_requests()
2057 mutex_unlock(&osdc->request_mutex); in kick_requests()
2061 ceph_monc_request_next_osdmap(&osdc->client->monc); in kick_requests()
2073 void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg) in ceph_osdc_handle_map() argument
2083 dout("handle_map have %u\n", osdc->osdmap ? osdc->osdmap->epoch : 0); in ceph_osdc_handle_map()
2090 if (ceph_check_fsid(osdc->client, &fsid) < 0) in ceph_osdc_handle_map()
2093 down_write(&osdc->map_sem); in ceph_osdc_handle_map()
2095 was_full = ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_FULL); in ceph_osdc_handle_map()
2106 if (osdc->osdmap && osdc->osdmap->epoch+1 == epoch) { in ceph_osdc_handle_map()
2110 osdc->osdmap, in ceph_osdc_handle_map()
2111 &osdc->client->msgr); in ceph_osdc_handle_map()
2117 if (newmap != osdc->osdmap) { in ceph_osdc_handle_map()
2118 ceph_osdmap_destroy(osdc->osdmap); in ceph_osdc_handle_map()
2119 osdc->osdmap = newmap; in ceph_osdc_handle_map()
2122 ceph_osdmap_flag(osdc->osdmap, in ceph_osdc_handle_map()
2124 kick_requests(osdc, 0, was_full); in ceph_osdc_handle_map()
2146 } else if (osdc->osdmap && osdc->osdmap->epoch >= epoch) { in ceph_osdc_handle_map()
2149 osdc->osdmap->epoch); in ceph_osdc_handle_map()
2160 oldmap = osdc->osdmap; in ceph_osdc_handle_map()
2161 osdc->osdmap = newmap; in ceph_osdc_handle_map()
2168 ceph_osdmap_flag(osdc->osdmap, in ceph_osdc_handle_map()
2170 kick_requests(osdc, skipped_map, was_full); in ceph_osdc_handle_map()
2176 if (!osdc->osdmap) in ceph_osdc_handle_map()
2179 downgrade_write(&osdc->map_sem); in ceph_osdc_handle_map()
2180 ceph_monc_got_osdmap(&osdc->client->monc, osdc->osdmap->epoch); in ceph_osdc_handle_map()
2187 if (ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_FULL) || in ceph_osdc_handle_map()
2188 ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_PAUSERD) || in ceph_osdc_handle_map()
2189 ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_PAUSEWR)) in ceph_osdc_handle_map()
2190 ceph_monc_request_next_osdmap(&osdc->client->monc); in ceph_osdc_handle_map()
2192 mutex_lock(&osdc->request_mutex); in ceph_osdc_handle_map()
2193 __send_queued(osdc); in ceph_osdc_handle_map()
2194 mutex_unlock(&osdc->request_mutex); in ceph_osdc_handle_map()
2195 up_read(&osdc->map_sem); in ceph_osdc_handle_map()
2196 wake_up_all(&osdc->client->auth_wq); in ceph_osdc_handle_map()
2202 up_write(&osdc->map_sem); in ceph_osdc_handle_map()
2230 static void __insert_event(struct ceph_osd_client *osdc, in __insert_event() argument
2233 struct rb_node **p = &osdc->event_tree.rb_node; in __insert_event()
2249 rb_insert_color(&new->node, &osdc->event_tree); in __insert_event()
2252 static struct ceph_osd_event *__find_event(struct ceph_osd_client *osdc, in __find_event() argument
2255 struct rb_node **p = &osdc->event_tree.rb_node; in __find_event()
2274 struct ceph_osd_client *osdc = event->osdc; in __remove_event() local
2278 rb_erase(&event->node, &osdc->event_tree); in __remove_event()
2285 int ceph_osdc_create_event(struct ceph_osd_client *osdc, in ceph_osdc_create_event() argument
2299 event->osdc = osdc; in ceph_osdc_create_event()
2305 spin_lock(&osdc->event_lock); in ceph_osdc_create_event()
2306 event->cookie = ++osdc->event_count; in ceph_osdc_create_event()
2307 __insert_event(osdc, event); in ceph_osdc_create_event()
2308 spin_unlock(&osdc->event_lock); in ceph_osdc_create_event()
2317 struct ceph_osd_client *osdc = event->osdc; in ceph_osdc_cancel_event() local
2320 spin_lock(&osdc->event_lock); in ceph_osdc_cancel_event()
2322 spin_unlock(&osdc->event_lock); in ceph_osdc_cancel_event()
2348 static void handle_watch_notify(struct ceph_osd_client *osdc, in handle_watch_notify() argument
2367 spin_lock(&osdc->event_lock); in handle_watch_notify()
2368 event = __find_event(osdc, cookie); in handle_watch_notify()
2373 spin_unlock(&osdc->event_lock); in handle_watch_notify()
2389 queue_work(osdc->notify_wq, &event_work->work); in handle_watch_notify()
2500 int ceph_osdc_start_request(struct ceph_osd_client *osdc, in ceph_osdc_start_request() argument
2506 down_read(&osdc->map_sem); in ceph_osdc_start_request()
2507 mutex_lock(&osdc->request_mutex); in ceph_osdc_start_request()
2509 rc = __ceph_osdc_start_request(osdc, req, nofail); in ceph_osdc_start_request()
2511 mutex_unlock(&osdc->request_mutex); in ceph_osdc_start_request()
2512 up_read(&osdc->map_sem); in ceph_osdc_start_request()
2525 struct ceph_osd_client *osdc = req->r_osdc; in ceph_osdc_cancel_request() local
2527 mutex_lock(&osdc->request_mutex); in ceph_osdc_cancel_request()
2529 __unregister_linger_request(osdc, req); in ceph_osdc_cancel_request()
2530 __unregister_request(osdc, req); in ceph_osdc_cancel_request()
2531 mutex_unlock(&osdc->request_mutex); in ceph_osdc_cancel_request()
2540 int ceph_osdc_wait_request(struct ceph_osd_client *osdc, in ceph_osdc_wait_request() argument
2564 void ceph_osdc_sync(struct ceph_osd_client *osdc) in ceph_osdc_sync() argument
2569 mutex_lock(&osdc->request_mutex); in ceph_osdc_sync()
2570 last_tid = osdc->last_tid; in ceph_osdc_sync()
2572 req = __lookup_request_ge(osdc, next_tid); in ceph_osdc_sync()
2583 mutex_unlock(&osdc->request_mutex); in ceph_osdc_sync()
2587 mutex_lock(&osdc->request_mutex); in ceph_osdc_sync()
2590 mutex_unlock(&osdc->request_mutex); in ceph_osdc_sync()
2599 void ceph_osdc_flush_notifies(struct ceph_osd_client *osdc) in ceph_osdc_flush_notifies() argument
2601 flush_workqueue(osdc->notify_wq); in ceph_osdc_flush_notifies()
2609 int ceph_osdc_init(struct ceph_osd_client *osdc, struct ceph_client *client) in ceph_osdc_init() argument
2614 osdc->client = client; in ceph_osdc_init()
2615 osdc->osdmap = NULL; in ceph_osdc_init()
2616 init_rwsem(&osdc->map_sem); in ceph_osdc_init()
2617 init_completion(&osdc->map_waiters); in ceph_osdc_init()
2618 osdc->last_requested_map = 0; in ceph_osdc_init()
2619 mutex_init(&osdc->request_mutex); in ceph_osdc_init()
2620 osdc->last_tid = 0; in ceph_osdc_init()
2621 osdc->osds = RB_ROOT; in ceph_osdc_init()
2622 INIT_LIST_HEAD(&osdc->osd_lru); in ceph_osdc_init()
2623 osdc->requests = RB_ROOT; in ceph_osdc_init()
2624 INIT_LIST_HEAD(&osdc->req_lru); in ceph_osdc_init()
2625 INIT_LIST_HEAD(&osdc->req_unsent); in ceph_osdc_init()
2626 INIT_LIST_HEAD(&osdc->req_notarget); in ceph_osdc_init()
2627 INIT_LIST_HEAD(&osdc->req_linger); in ceph_osdc_init()
2628 osdc->num_requests = 0; in ceph_osdc_init()
2629 INIT_DELAYED_WORK(&osdc->timeout_work, handle_timeout); in ceph_osdc_init()
2630 INIT_DELAYED_WORK(&osdc->osds_timeout_work, handle_osds_timeout); in ceph_osdc_init()
2631 spin_lock_init(&osdc->event_lock); in ceph_osdc_init()
2632 osdc->event_tree = RB_ROOT; in ceph_osdc_init()
2633 osdc->event_count = 0; in ceph_osdc_init()
2635 schedule_delayed_work(&osdc->osds_timeout_work, in ceph_osdc_init()
2636 round_jiffies_relative(osdc->client->options->osd_idle_ttl)); in ceph_osdc_init()
2639 osdc->req_mempool = mempool_create_kmalloc_pool(10, in ceph_osdc_init()
2641 if (!osdc->req_mempool) in ceph_osdc_init()
2644 err = ceph_msgpool_init(&osdc->msgpool_op, CEPH_MSG_OSD_OP, in ceph_osdc_init()
2649 err = ceph_msgpool_init(&osdc->msgpool_op_reply, CEPH_MSG_OSD_OPREPLY, in ceph_osdc_init()
2656 osdc->notify_wq = create_singlethread_workqueue("ceph-watch-notify"); in ceph_osdc_init()
2657 if (!osdc->notify_wq) in ceph_osdc_init()
2663 ceph_msgpool_destroy(&osdc->msgpool_op_reply); in ceph_osdc_init()
2665 ceph_msgpool_destroy(&osdc->msgpool_op); in ceph_osdc_init()
2667 mempool_destroy(osdc->req_mempool); in ceph_osdc_init()
2672 void ceph_osdc_stop(struct ceph_osd_client *osdc) in ceph_osdc_stop() argument
2674 flush_workqueue(osdc->notify_wq); in ceph_osdc_stop()
2675 destroy_workqueue(osdc->notify_wq); in ceph_osdc_stop()
2676 cancel_delayed_work_sync(&osdc->timeout_work); in ceph_osdc_stop()
2677 cancel_delayed_work_sync(&osdc->osds_timeout_work); in ceph_osdc_stop()
2678 if (osdc->osdmap) { in ceph_osdc_stop()
2679 ceph_osdmap_destroy(osdc->osdmap); in ceph_osdc_stop()
2680 osdc->osdmap = NULL; in ceph_osdc_stop()
2682 remove_all_osds(osdc); in ceph_osdc_stop()
2683 mempool_destroy(osdc->req_mempool); in ceph_osdc_stop()
2684 ceph_msgpool_destroy(&osdc->msgpool_op); in ceph_osdc_stop()
2685 ceph_msgpool_destroy(&osdc->msgpool_op_reply); in ceph_osdc_stop()
2692 int ceph_osdc_readpages(struct ceph_osd_client *osdc, in ceph_osdc_readpages() argument
2703 req = ceph_osdc_new_request(osdc, layout, vino, off, plen, 0, 1, in ceph_osdc_readpages()
2720 rc = ceph_osdc_start_request(osdc, req, false); in ceph_osdc_readpages()
2722 rc = ceph_osdc_wait_request(osdc, req); in ceph_osdc_readpages()
2733 int ceph_osdc_writepages(struct ceph_osd_client *osdc, struct ceph_vino vino, in ceph_osdc_writepages() argument
2746 req = ceph_osdc_new_request(osdc, layout, vino, off, &len, 0, 1, in ceph_osdc_writepages()
2761 rc = ceph_osdc_start_request(osdc, req, true); in ceph_osdc_writepages()
2763 rc = ceph_osdc_wait_request(osdc, req); in ceph_osdc_writepages()
2799 struct ceph_osd_client *osdc; in dispatch() local
2804 osdc = osd->o_osdc; in dispatch()
2808 ceph_osdc_handle_map(osdc, msg); in dispatch()
2811 handle_reply(osdc, msg); in dispatch()
2814 handle_watch_notify(osdc, msg); in dispatch()
2835 struct ceph_osd_client *osdc = osd->o_osdc; in get_reply() local
2843 mutex_lock(&osdc->request_mutex); in get_reply()
2844 req = __lookup_request(osdc, tid); in get_reply()
2880 mutex_unlock(&osdc->request_mutex); in get_reply()
2935 struct ceph_osd_client *osdc = o->o_osdc; in get_authorizer() local
2936 struct ceph_auth_client *ac = osdc->client->monc.auth; in get_authorizer()
2963 struct ceph_osd_client *osdc = o->o_osdc; in verify_authorizer_reply() local
2964 struct ceph_auth_client *ac = osdc->client->monc.auth; in verify_authorizer_reply()
2972 struct ceph_osd_client *osdc = o->o_osdc; in invalidate_authorizer() local
2973 struct ceph_auth_client *ac = osdc->client->monc.auth; in invalidate_authorizer()
2976 return ceph_monc_validate_auth(&osdc->client->monc); in invalidate_authorizer()