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,
356 struct ceph_osd_request *ceph_osdc_alloc_request(struct ceph_osd_client *osdc, in ceph_osdc_alloc_request() argument
380 req = mempool_alloc(osdc->req_mempool, gfp_flags); in ceph_osdc_alloc_request()
388 req->r_osdc = osdc; in ceph_osdc_alloc_request()
407 msg = ceph_msgpool_get(&osdc->msgpool_op_reply, 0); in ceph_osdc_alloc_request()
419 msg = ceph_msgpool_get(&osdc->msgpool_op, 0); in ceph_osdc_alloc_request()
753 struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc, in ceph_osdc_new_request() argument
774 req = ceph_osdc_alloc_request(osdc, snapc, num_ops, use_mempool, in ceph_osdc_new_request()
819 static void __insert_request(struct ceph_osd_client *osdc, in __insert_request() argument
822 struct rb_node **p = &osdc->requests.rb_node; in __insert_request()
838 rb_insert_color(&new->r_node, &osdc->requests); in __insert_request()
841 static struct ceph_osd_request *__lookup_request(struct ceph_osd_client *osdc, in __lookup_request() argument
845 struct rb_node *n = osdc->requests.rb_node; in __lookup_request()
860 __lookup_request_ge(struct ceph_osd_client *osdc, in __lookup_request_ge() argument
864 struct rb_node *n = osdc->requests.rb_node; in __lookup_request_ge()
883 struct ceph_osd_client *osdc = req->r_osdc; in __kick_linger_request() local
893 __unregister_linger_request(osdc, req); in __kick_linger_request()
895 __unregister_request(osdc, req); in __kick_linger_request()
896 __register_request(osdc, req); in __kick_linger_request()
915 static void __kick_osd_requests(struct ceph_osd_client *osdc, in __kick_osd_requests() argument
924 err = __reset_osd(osdc, osd); in __kick_osd_requests()
958 list_splice(&resend, &osdc->req_unsent); in __kick_osd_requests()
982 struct ceph_osd_client *osdc; in osd_reset() local
987 osdc = osd->o_osdc; in osd_reset()
988 down_read(&osdc->map_sem); in osd_reset()
989 mutex_lock(&osdc->request_mutex); in osd_reset()
990 __kick_osd_requests(osdc, osd); in osd_reset()
991 __send_queued(osdc); in osd_reset()
992 mutex_unlock(&osdc->request_mutex); in osd_reset()
993 up_read(&osdc->map_sem); in osd_reset()
999 static struct ceph_osd *create_osd(struct ceph_osd_client *osdc, int onum) in create_osd() argument
1008 osd->o_osdc = osdc; in create_osd()
1016 ceph_con_init(&osd->o_con, osd, &osd_con_ops, &osdc->client->msgr); in create_osd()
1050 static void __remove_osd(struct ceph_osd_client *osdc, struct ceph_osd *osd) in __remove_osd() argument
1057 rb_erase(&osd->o_node, &osdc->osds); in __remove_osd()
1061 static void remove_osd(struct ceph_osd_client *osdc, struct ceph_osd *osd) in remove_osd() argument
1067 __remove_osd(osdc, osd); in remove_osd()
1072 static void remove_all_osds(struct ceph_osd_client *osdc) in remove_all_osds() argument
1074 dout("%s %p\n", __func__, osdc); in remove_all_osds()
1075 mutex_lock(&osdc->request_mutex); in remove_all_osds()
1076 while (!RB_EMPTY_ROOT(&osdc->osds)) { in remove_all_osds()
1077 struct ceph_osd *osd = rb_entry(rb_first(&osdc->osds), in remove_all_osds()
1079 remove_osd(osdc, osd); in remove_all_osds()
1081 mutex_unlock(&osdc->request_mutex); in remove_all_osds()
1084 static void __move_osd_to_lru(struct ceph_osd_client *osdc, in __move_osd_to_lru() argument
1090 list_add_tail(&osd->o_osd_lru, &osdc->osd_lru); in __move_osd_to_lru()
1091 osd->lru_ttl = jiffies + osdc->client->options->osd_idle_ttl * HZ; in __move_osd_to_lru()
1094 static void maybe_move_osd_to_lru(struct ceph_osd_client *osdc, in maybe_move_osd_to_lru() argument
1101 __move_osd_to_lru(osdc, osd); in maybe_move_osd_to_lru()
1111 static void remove_old_osds(struct ceph_osd_client *osdc) in remove_old_osds() argument
1115 dout("__remove_old_osds %p\n", osdc); in remove_old_osds()
1116 mutex_lock(&osdc->request_mutex); in remove_old_osds()
1117 list_for_each_entry_safe(osd, nosd, &osdc->osd_lru, o_osd_lru) { in remove_old_osds()
1120 remove_osd(osdc, osd); in remove_old_osds()
1122 mutex_unlock(&osdc->request_mutex); in remove_old_osds()
1128 static int __reset_osd(struct ceph_osd_client *osdc, struct ceph_osd *osd) in __reset_osd() argument
1135 remove_osd(osdc, osd); in __reset_osd()
1139 peer_addr = &osdc->osdmap->osd_addr[osd->o_osd]; in __reset_osd()
1160 static void __insert_osd(struct ceph_osd_client *osdc, struct ceph_osd *new) in __insert_osd() argument
1162 struct rb_node **p = &osdc->osds.rb_node; in __insert_osd()
1179 rb_insert_color(&new->o_node, &osdc->osds); in __insert_osd()
1182 static struct ceph_osd *__lookup_osd(struct ceph_osd_client *osdc, int o) in __lookup_osd() argument
1185 struct rb_node *n = osdc->osds.rb_node; in __lookup_osd()
1199 static void __schedule_osd_timeout(struct ceph_osd_client *osdc) in __schedule_osd_timeout() argument
1201 schedule_delayed_work(&osdc->timeout_work, in __schedule_osd_timeout()
1202 osdc->client->options->osd_keepalive_timeout * HZ); in __schedule_osd_timeout()
1205 static void __cancel_osd_timeout(struct ceph_osd_client *osdc) in __cancel_osd_timeout() argument
1207 cancel_delayed_work(&osdc->timeout_work); in __cancel_osd_timeout()
1214 static void __register_request(struct ceph_osd_client *osdc, in __register_request() argument
1217 req->r_tid = ++osdc->last_tid; in __register_request()
1220 __insert_request(osdc, req); in __register_request()
1222 osdc->num_requests++; in __register_request()
1223 if (osdc->num_requests == 1) { in __register_request()
1225 __schedule_osd_timeout(osdc); in __register_request()
1232 static void __unregister_request(struct ceph_osd_client *osdc, in __unregister_request() argument
1242 rb_erase(&req->r_node, &osdc->requests); in __unregister_request()
1244 osdc->num_requests--; in __unregister_request()
1251 maybe_move_osd_to_lru(osdc, req->r_osd); in __unregister_request()
1259 if (osdc->num_requests == 0) { in __unregister_request()
1261 __cancel_osd_timeout(osdc); in __unregister_request()
1276 static void __register_linger_request(struct ceph_osd_client *osdc, in __register_linger_request() argument
1283 list_add_tail(&req->r_linger_item, &osdc->req_linger); in __register_linger_request()
1289 static void __unregister_linger_request(struct ceph_osd_client *osdc, in __unregister_linger_request() argument
1305 maybe_move_osd_to_lru(osdc, req->r_osd); in __unregister_linger_request()
1312 void ceph_osdc_set_request_linger(struct ceph_osd_client *osdc, in ceph_osdc_set_request_linger() argument
1328 static bool __req_should_be_paused(struct ceph_osd_client *osdc, in __req_should_be_paused() argument
1331 bool pauserd = ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_PAUSERD); in __req_should_be_paused()
1332 bool pausewr = ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_PAUSEWR) || in __req_should_be_paused()
1333 ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_FULL); in __req_should_be_paused()
1379 struct ceph_osd_client *osdc = req->r_osdc; in __enqueue_request() local
1387 list_move_tail(&req->r_req_lru_item, &osdc->req_unsent); in __enqueue_request()
1389 list_move_tail(&req->r_req_lru_item, &osdc->req_notarget); in __enqueue_request()
1403 static int __map_request(struct ceph_osd_client *osdc, in __map_request() argument
1414 err = __calc_request_pg(osdc->osdmap, req, &pgid); in __map_request()
1416 list_move(&req->r_req_lru_item, &osdc->req_notarget); in __map_request()
1421 num = ceph_calc_pg_acting(osdc->osdmap, pgid, acting, &o); in __map_request()
1426 req->r_paused = __req_should_be_paused(osdc, req); in __map_request()
1454 req->r_osd = __lookup_osd(osdc, o); in __map_request()
1457 req->r_osd = create_osd(osdc, o); in __map_request()
1459 list_move(&req->r_req_lru_item, &osdc->req_notarget); in __map_request()
1464 __insert_osd(osdc, req->r_osd); in __map_request()
1468 &osdc->osdmap->osd_addr[o]); in __map_request()
1481 static void __send_request(struct ceph_osd_client *osdc, in __send_request() argument
1491 put_unaligned_le32(osdc->osdmap->epoch, req->r_request_osdmap_epoch); in __send_request()
1502 list_move_tail(&req->r_req_lru_item, &osdc->req_lru); in __send_request()
1514 static void __send_queued(struct ceph_osd_client *osdc) in __send_queued() argument
1519 list_for_each_entry_safe(req, tmp, &osdc->req_unsent, r_req_lru_item) in __send_queued()
1520 __send_request(osdc, req); in __send_queued()
1526 static int __ceph_osdc_start_request(struct ceph_osd_client *osdc, in __ceph_osdc_start_request() argument
1532 __register_request(osdc, req); in __ceph_osdc_start_request()
1535 rc = __map_request(osdc, req, 0); in __ceph_osdc_start_request()
1542 __unregister_request(osdc, req); in __ceph_osdc_start_request()
1549 ceph_monc_request_next_osdmap(&osdc->client->monc); in __ceph_osdc_start_request()
1551 __send_queued(osdc); in __ceph_osdc_start_request()
1568 struct ceph_osd_client *osdc = in handle_timeout() local
1573 osdc->client->options->osd_keepalive_timeout * HZ; in handle_timeout()
1576 down_read(&osdc->map_sem); in handle_timeout()
1578 ceph_monc_request_next_osdmap(&osdc->client->monc); in handle_timeout()
1580 mutex_lock(&osdc->request_mutex); in handle_timeout()
1588 list_for_each_entry(req, &osdc->req_lru, r_req_lru_item) { in handle_timeout()
1605 __schedule_osd_timeout(osdc); in handle_timeout()
1606 __send_queued(osdc); in handle_timeout()
1607 mutex_unlock(&osdc->request_mutex); in handle_timeout()
1608 up_read(&osdc->map_sem); in handle_timeout()
1613 struct ceph_osd_client *osdc = in handle_osds_timeout() local
1617 osdc->client->options->osd_idle_ttl * HZ >> 2; in handle_osds_timeout()
1620 down_read(&osdc->map_sem); in handle_osds_timeout()
1621 remove_old_osds(osdc); in handle_osds_timeout()
1622 up_read(&osdc->map_sem); in handle_osds_timeout()
1624 schedule_delayed_work(&osdc->osds_timeout_work, in handle_osds_timeout()
1740 static void handle_reply(struct ceph_osd_client *osdc, struct ceph_msg *msg, in handle_reply() argument
1784 down_read(&osdc->map_sem); in handle_reply()
1785 mutex_lock(&osdc->request_mutex); in handle_reply()
1786 req = __lookup_request(osdc, tid); in handle_reply()
1840 __unregister_request(osdc, req); in handle_reply()
1852 err = __ceph_osdc_start_request(osdc, req, true); in handle_reply()
1879 __register_linger_request(osdc, req); in handle_reply()
1885 __unregister_request(osdc, req); in handle_reply()
1887 mutex_unlock(&osdc->request_mutex); in handle_reply()
1888 up_read(&osdc->map_sem); in handle_reply()
1911 mutex_unlock(&osdc->request_mutex); in handle_reply()
1912 up_read(&osdc->map_sem); in handle_reply()
1917 __unregister_request(osdc, req); in handle_reply()
1925 mutex_unlock(&osdc->request_mutex); in handle_reply()
1926 up_read(&osdc->map_sem); in handle_reply()
1933 static void reset_changed_osds(struct ceph_osd_client *osdc) in reset_changed_osds() argument
1937 dout("%s %p\n", __func__, osdc); in reset_changed_osds()
1938 for (p = rb_first(&osdc->osds); p; p = n) { in reset_changed_osds()
1942 if (!ceph_osd_is_up(osdc->osdmap, osd->o_osd) || in reset_changed_osds()
1944 ceph_osd_addr(osdc->osdmap, in reset_changed_osds()
1947 __reset_osd(osdc, osd); in reset_changed_osds()
1957 static void kick_requests(struct ceph_osd_client *osdc, bool force_resend, in kick_requests() argument
1968 mutex_lock(&osdc->request_mutex); in kick_requests()
1969 for (p = rb_first(&osdc->requests); p; ) { in kick_requests()
1986 __unregister_request(osdc, req); in kick_requests()
1987 __register_linger_request(osdc, req); in kick_requests()
1995 err = __map_request(osdc, req, force_resend_req); in kick_requests()
2011 list_for_each_entry_safe(req, nreq, &osdc->req_linger, in kick_requests()
2015 err = __map_request(osdc, req, in kick_requests()
2038 __register_request(osdc, req); in kick_requests()
2039 __unregister_linger_request(osdc, req); in kick_requests()
2042 reset_changed_osds(osdc); in kick_requests()
2043 mutex_unlock(&osdc->request_mutex); in kick_requests()
2047 ceph_monc_request_next_osdmap(&osdc->client->monc); in kick_requests()
2059 void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg) in ceph_osdc_handle_map() argument
2069 dout("handle_map have %u\n", osdc->osdmap ? osdc->osdmap->epoch : 0); in ceph_osdc_handle_map()
2076 if (ceph_check_fsid(osdc->client, &fsid) < 0) in ceph_osdc_handle_map()
2079 down_write(&osdc->map_sem); in ceph_osdc_handle_map()
2081 was_full = ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_FULL); in ceph_osdc_handle_map()
2092 if (osdc->osdmap && osdc->osdmap->epoch+1 == epoch) { in ceph_osdc_handle_map()
2096 osdc->osdmap, in ceph_osdc_handle_map()
2097 &osdc->client->msgr); in ceph_osdc_handle_map()
2103 if (newmap != osdc->osdmap) { in ceph_osdc_handle_map()
2104 ceph_osdmap_destroy(osdc->osdmap); in ceph_osdc_handle_map()
2105 osdc->osdmap = newmap; in ceph_osdc_handle_map()
2108 ceph_osdmap_flag(osdc->osdmap, in ceph_osdc_handle_map()
2110 kick_requests(osdc, 0, was_full); in ceph_osdc_handle_map()
2132 } else if (osdc->osdmap && osdc->osdmap->epoch >= epoch) { in ceph_osdc_handle_map()
2135 osdc->osdmap->epoch); in ceph_osdc_handle_map()
2146 oldmap = osdc->osdmap; in ceph_osdc_handle_map()
2147 osdc->osdmap = newmap; in ceph_osdc_handle_map()
2154 ceph_osdmap_flag(osdc->osdmap, in ceph_osdc_handle_map()
2156 kick_requests(osdc, skipped_map, was_full); in ceph_osdc_handle_map()
2162 if (!osdc->osdmap) in ceph_osdc_handle_map()
2165 downgrade_write(&osdc->map_sem); in ceph_osdc_handle_map()
2166 ceph_monc_got_osdmap(&osdc->client->monc, osdc->osdmap->epoch); in ceph_osdc_handle_map()
2173 if (ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_FULL) || in ceph_osdc_handle_map()
2174 ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_PAUSERD) || in ceph_osdc_handle_map()
2175 ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_PAUSEWR)) in ceph_osdc_handle_map()
2176 ceph_monc_request_next_osdmap(&osdc->client->monc); in ceph_osdc_handle_map()
2178 mutex_lock(&osdc->request_mutex); in ceph_osdc_handle_map()
2179 __send_queued(osdc); in ceph_osdc_handle_map()
2180 mutex_unlock(&osdc->request_mutex); in ceph_osdc_handle_map()
2181 up_read(&osdc->map_sem); in ceph_osdc_handle_map()
2182 wake_up_all(&osdc->client->auth_wq); in ceph_osdc_handle_map()
2188 up_write(&osdc->map_sem); in ceph_osdc_handle_map()
2216 static void __insert_event(struct ceph_osd_client *osdc, in __insert_event() argument
2219 struct rb_node **p = &osdc->event_tree.rb_node; in __insert_event()
2235 rb_insert_color(&new->node, &osdc->event_tree); in __insert_event()
2238 static struct ceph_osd_event *__find_event(struct ceph_osd_client *osdc, in __find_event() argument
2241 struct rb_node **p = &osdc->event_tree.rb_node; in __find_event()
2260 struct ceph_osd_client *osdc = event->osdc; in __remove_event() local
2264 rb_erase(&event->node, &osdc->event_tree); in __remove_event()
2271 int ceph_osdc_create_event(struct ceph_osd_client *osdc, in ceph_osdc_create_event() argument
2285 event->osdc = osdc; in ceph_osdc_create_event()
2291 spin_lock(&osdc->event_lock); in ceph_osdc_create_event()
2292 event->cookie = ++osdc->event_count; in ceph_osdc_create_event()
2293 __insert_event(osdc, event); in ceph_osdc_create_event()
2294 spin_unlock(&osdc->event_lock); in ceph_osdc_create_event()
2303 struct ceph_osd_client *osdc = event->osdc; in ceph_osdc_cancel_event() local
2306 spin_lock(&osdc->event_lock); in ceph_osdc_cancel_event()
2308 spin_unlock(&osdc->event_lock); in ceph_osdc_cancel_event()
2334 static void handle_watch_notify(struct ceph_osd_client *osdc, in handle_watch_notify() argument
2353 spin_lock(&osdc->event_lock); in handle_watch_notify()
2354 event = __find_event(osdc, cookie); in handle_watch_notify()
2359 spin_unlock(&osdc->event_lock); in handle_watch_notify()
2375 queue_work(osdc->notify_wq, &event_work->work); in handle_watch_notify()
2486 int ceph_osdc_start_request(struct ceph_osd_client *osdc, in ceph_osdc_start_request() argument
2492 down_read(&osdc->map_sem); in ceph_osdc_start_request()
2493 mutex_lock(&osdc->request_mutex); in ceph_osdc_start_request()
2495 rc = __ceph_osdc_start_request(osdc, req, nofail); in ceph_osdc_start_request()
2497 mutex_unlock(&osdc->request_mutex); in ceph_osdc_start_request()
2498 up_read(&osdc->map_sem); in ceph_osdc_start_request()
2511 struct ceph_osd_client *osdc = req->r_osdc; in ceph_osdc_cancel_request() local
2513 mutex_lock(&osdc->request_mutex); in ceph_osdc_cancel_request()
2515 __unregister_linger_request(osdc, req); in ceph_osdc_cancel_request()
2516 __unregister_request(osdc, req); in ceph_osdc_cancel_request()
2517 mutex_unlock(&osdc->request_mutex); in ceph_osdc_cancel_request()
2526 int ceph_osdc_wait_request(struct ceph_osd_client *osdc, in ceph_osdc_wait_request() argument
2550 void ceph_osdc_sync(struct ceph_osd_client *osdc) in ceph_osdc_sync() argument
2555 mutex_lock(&osdc->request_mutex); in ceph_osdc_sync()
2556 last_tid = osdc->last_tid; in ceph_osdc_sync()
2558 req = __lookup_request_ge(osdc, next_tid); in ceph_osdc_sync()
2569 mutex_unlock(&osdc->request_mutex); in ceph_osdc_sync()
2573 mutex_lock(&osdc->request_mutex); in ceph_osdc_sync()
2576 mutex_unlock(&osdc->request_mutex); in ceph_osdc_sync()
2585 void ceph_osdc_flush_notifies(struct ceph_osd_client *osdc) in ceph_osdc_flush_notifies() argument
2587 flush_workqueue(osdc->notify_wq); in ceph_osdc_flush_notifies()
2595 int ceph_osdc_init(struct ceph_osd_client *osdc, struct ceph_client *client) in ceph_osdc_init() argument
2600 osdc->client = client; in ceph_osdc_init()
2601 osdc->osdmap = NULL; in ceph_osdc_init()
2602 init_rwsem(&osdc->map_sem); in ceph_osdc_init()
2603 init_completion(&osdc->map_waiters); in ceph_osdc_init()
2604 osdc->last_requested_map = 0; in ceph_osdc_init()
2605 mutex_init(&osdc->request_mutex); in ceph_osdc_init()
2606 osdc->last_tid = 0; in ceph_osdc_init()
2607 osdc->osds = RB_ROOT; in ceph_osdc_init()
2608 INIT_LIST_HEAD(&osdc->osd_lru); in ceph_osdc_init()
2609 osdc->requests = RB_ROOT; in ceph_osdc_init()
2610 INIT_LIST_HEAD(&osdc->req_lru); in ceph_osdc_init()
2611 INIT_LIST_HEAD(&osdc->req_unsent); in ceph_osdc_init()
2612 INIT_LIST_HEAD(&osdc->req_notarget); in ceph_osdc_init()
2613 INIT_LIST_HEAD(&osdc->req_linger); in ceph_osdc_init()
2614 osdc->num_requests = 0; in ceph_osdc_init()
2615 INIT_DELAYED_WORK(&osdc->timeout_work, handle_timeout); in ceph_osdc_init()
2616 INIT_DELAYED_WORK(&osdc->osds_timeout_work, handle_osds_timeout); in ceph_osdc_init()
2617 spin_lock_init(&osdc->event_lock); in ceph_osdc_init()
2618 osdc->event_tree = RB_ROOT; in ceph_osdc_init()
2619 osdc->event_count = 0; in ceph_osdc_init()
2621 schedule_delayed_work(&osdc->osds_timeout_work, in ceph_osdc_init()
2622 round_jiffies_relative(osdc->client->options->osd_idle_ttl * HZ)); in ceph_osdc_init()
2625 osdc->req_mempool = mempool_create_kmalloc_pool(10, in ceph_osdc_init()
2627 if (!osdc->req_mempool) in ceph_osdc_init()
2630 err = ceph_msgpool_init(&osdc->msgpool_op, CEPH_MSG_OSD_OP, in ceph_osdc_init()
2635 err = ceph_msgpool_init(&osdc->msgpool_op_reply, CEPH_MSG_OSD_OPREPLY, in ceph_osdc_init()
2642 osdc->notify_wq = create_singlethread_workqueue("ceph-watch-notify"); in ceph_osdc_init()
2643 if (!osdc->notify_wq) in ceph_osdc_init()
2649 ceph_msgpool_destroy(&osdc->msgpool_op_reply); in ceph_osdc_init()
2651 ceph_msgpool_destroy(&osdc->msgpool_op); in ceph_osdc_init()
2653 mempool_destroy(osdc->req_mempool); in ceph_osdc_init()
2658 void ceph_osdc_stop(struct ceph_osd_client *osdc) in ceph_osdc_stop() argument
2660 flush_workqueue(osdc->notify_wq); in ceph_osdc_stop()
2661 destroy_workqueue(osdc->notify_wq); in ceph_osdc_stop()
2662 cancel_delayed_work_sync(&osdc->timeout_work); in ceph_osdc_stop()
2663 cancel_delayed_work_sync(&osdc->osds_timeout_work); in ceph_osdc_stop()
2664 if (osdc->osdmap) { in ceph_osdc_stop()
2665 ceph_osdmap_destroy(osdc->osdmap); in ceph_osdc_stop()
2666 osdc->osdmap = NULL; in ceph_osdc_stop()
2668 remove_all_osds(osdc); in ceph_osdc_stop()
2669 mempool_destroy(osdc->req_mempool); in ceph_osdc_stop()
2670 ceph_msgpool_destroy(&osdc->msgpool_op); in ceph_osdc_stop()
2671 ceph_msgpool_destroy(&osdc->msgpool_op_reply); in ceph_osdc_stop()
2678 int ceph_osdc_readpages(struct ceph_osd_client *osdc, in ceph_osdc_readpages() argument
2689 req = ceph_osdc_new_request(osdc, layout, vino, off, plen, 0, 1, in ceph_osdc_readpages()
2706 rc = ceph_osdc_start_request(osdc, req, false); in ceph_osdc_readpages()
2708 rc = ceph_osdc_wait_request(osdc, req); in ceph_osdc_readpages()
2719 int ceph_osdc_writepages(struct ceph_osd_client *osdc, struct ceph_vino vino, in ceph_osdc_writepages() argument
2732 req = ceph_osdc_new_request(osdc, layout, vino, off, &len, 0, 1, in ceph_osdc_writepages()
2747 rc = ceph_osdc_start_request(osdc, req, true); in ceph_osdc_writepages()
2749 rc = ceph_osdc_wait_request(osdc, req); in ceph_osdc_writepages()
2785 struct ceph_osd_client *osdc; in dispatch() local
2790 osdc = osd->o_osdc; in dispatch()
2794 ceph_osdc_handle_map(osdc, msg); in dispatch()
2797 handle_reply(osdc, msg, con); in dispatch()
2800 handle_watch_notify(osdc, msg); in dispatch()
2820 struct ceph_osd_client *osdc = osd->o_osdc; in get_reply() local
2828 mutex_lock(&osdc->request_mutex); in get_reply()
2829 req = __lookup_request(osdc, tid); in get_reply()
2883 mutex_unlock(&osdc->request_mutex); in get_reply()
2939 struct ceph_osd_client *osdc = o->o_osdc; in get_authorizer() local
2940 struct ceph_auth_client *ac = osdc->client->monc.auth; in get_authorizer()
2967 struct ceph_osd_client *osdc = o->o_osdc; in verify_authorizer_reply() local
2968 struct ceph_auth_client *ac = osdc->client->monc.auth; in verify_authorizer_reply()
2976 struct ceph_osd_client *osdc = o->o_osdc; in invalidate_authorizer() local
2977 struct ceph_auth_client *ac = osdc->client->monc.auth; in invalidate_authorizer()
2980 return ceph_monc_validate_auth(&osdc->client->monc); in invalidate_authorizer()