• Home
  • Raw
  • Download

Lines Matching refs:req

528 static void put_request_session(struct ceph_mds_request *req)  in put_request_session()  argument
530 if (req->r_session) { in put_request_session()
531 ceph_put_mds_session(req->r_session); in put_request_session()
532 req->r_session = NULL; in put_request_session()
538 struct ceph_mds_request *req = container_of(kref, in ceph_mdsc_release_request() local
541 destroy_reply_info(&req->r_reply_info); in ceph_mdsc_release_request()
542 if (req->r_request) in ceph_mdsc_release_request()
543 ceph_msg_put(req->r_request); in ceph_mdsc_release_request()
544 if (req->r_reply) in ceph_mdsc_release_request()
545 ceph_msg_put(req->r_reply); in ceph_mdsc_release_request()
546 if (req->r_inode) { in ceph_mdsc_release_request()
547 ceph_put_cap_refs(ceph_inode(req->r_inode), CEPH_CAP_PIN); in ceph_mdsc_release_request()
548 iput(req->r_inode); in ceph_mdsc_release_request()
550 if (req->r_locked_dir) in ceph_mdsc_release_request()
551 ceph_put_cap_refs(ceph_inode(req->r_locked_dir), CEPH_CAP_PIN); in ceph_mdsc_release_request()
552 iput(req->r_target_inode); in ceph_mdsc_release_request()
553 if (req->r_dentry) in ceph_mdsc_release_request()
554 dput(req->r_dentry); in ceph_mdsc_release_request()
555 if (req->r_old_dentry) in ceph_mdsc_release_request()
556 dput(req->r_old_dentry); in ceph_mdsc_release_request()
557 if (req->r_old_dentry_dir) { in ceph_mdsc_release_request()
564 ceph_put_cap_refs(ceph_inode(req->r_old_dentry_dir), in ceph_mdsc_release_request()
566 iput(req->r_old_dentry_dir); in ceph_mdsc_release_request()
568 kfree(req->r_path1); in ceph_mdsc_release_request()
569 kfree(req->r_path2); in ceph_mdsc_release_request()
570 if (req->r_pagelist) in ceph_mdsc_release_request()
571 ceph_pagelist_release(req->r_pagelist); in ceph_mdsc_release_request()
572 put_request_session(req); in ceph_mdsc_release_request()
573 ceph_unreserve_caps(req->r_mdsc, &req->r_caps_reservation); in ceph_mdsc_release_request()
574 kfree(req); in ceph_mdsc_release_request()
587 struct ceph_mds_request *req; in DEFINE_RB_FUNCS() local
589 req = lookup_request(&mdsc->request_tree, tid); in DEFINE_RB_FUNCS()
590 if (req) in DEFINE_RB_FUNCS()
591 ceph_mdsc_get_request(req); in DEFINE_RB_FUNCS()
593 return req; in DEFINE_RB_FUNCS()
603 struct ceph_mds_request *req, in __register_request() argument
606 req->r_tid = ++mdsc->last_tid; in __register_request()
607 if (req->r_num_caps) in __register_request()
608 ceph_reserve_caps(mdsc, &req->r_caps_reservation, in __register_request()
609 req->r_num_caps); in __register_request()
610 dout("__register_request %p tid %lld\n", req, req->r_tid); in __register_request()
611 ceph_mdsc_get_request(req); in __register_request()
612 insert_request(&mdsc->request_tree, req); in __register_request()
614 req->r_uid = current_fsuid(); in __register_request()
615 req->r_gid = current_fsgid(); in __register_request()
617 if (mdsc->oldest_tid == 0 && req->r_op != CEPH_MDS_OP_SETFILELOCK) in __register_request()
618 mdsc->oldest_tid = req->r_tid; in __register_request()
622 req->r_unsafe_dir = dir; in __register_request()
627 struct ceph_mds_request *req) in __unregister_request() argument
629 dout("__unregister_request %p tid %lld\n", req, req->r_tid); in __unregister_request()
632 list_del_init(&req->r_unsafe_item); in __unregister_request()
634 if (req->r_tid == mdsc->oldest_tid) { in __unregister_request()
635 struct rb_node *p = rb_next(&req->r_node); in __unregister_request()
648 erase_request(&mdsc->request_tree, req); in __unregister_request()
650 if (req->r_unsafe_dir && req->r_got_unsafe) { in __unregister_request()
651 struct ceph_inode_info *ci = ceph_inode(req->r_unsafe_dir); in __unregister_request()
653 list_del_init(&req->r_unsafe_dir_item); in __unregister_request()
656 if (req->r_target_inode && req->r_got_unsafe) { in __unregister_request()
657 struct ceph_inode_info *ci = ceph_inode(req->r_target_inode); in __unregister_request()
659 list_del_init(&req->r_unsafe_target_item); in __unregister_request()
663 if (req->r_unsafe_dir) { in __unregister_request()
664 iput(req->r_unsafe_dir); in __unregister_request()
665 req->r_unsafe_dir = NULL; in __unregister_request()
668 complete_all(&req->r_safe_completion); in __unregister_request()
670 ceph_mdsc_put_request(req); in __unregister_request()
695 struct ceph_mds_request *req) in __choose_mds() argument
700 int mode = req->r_direct_mode; in __choose_mds()
702 u32 hash = req->r_direct_hash; in __choose_mds()
703 bool is_hash = req->r_direct_is_hash; in __choose_mds()
709 if (req->r_resend_mds >= 0 && in __choose_mds()
710 (__have_session(mdsc, req->r_resend_mds) || in __choose_mds()
711 ceph_mdsmap_get_state(mdsc->mdsmap, req->r_resend_mds) > 0)) { in __choose_mds()
713 req->r_resend_mds); in __choose_mds()
714 return req->r_resend_mds; in __choose_mds()
721 if (req->r_inode) { in __choose_mds()
722 inode = req->r_inode; in __choose_mds()
723 } else if (req->r_dentry) { in __choose_mds()
725 struct dentry *parent = req->r_dentry->d_parent; in __choose_mds()
730 inode = d_inode(req->r_dentry); in __choose_mds()
739 inode = d_inode(req->r_dentry); in __choose_mds()
743 hash = ceph_dentry_hash(dir, req->r_dentry); in __choose_mds()
1034 struct ceph_mds_request *req; in cleanup_session_requests() local
1040 req = list_first_entry(&session->s_unsafe, in cleanup_session_requests()
1043 req->r_tid); in cleanup_session_requests()
1044 __unregister_request(mdsc, req); in cleanup_session_requests()
1049 req = rb_entry(p, struct ceph_mds_request, r_node); in cleanup_session_requests()
1051 if (req->r_session && in cleanup_session_requests()
1052 req->r_session->s_mds == session->s_mds) in cleanup_session_requests()
1053 req->r_attempts = 0; in cleanup_session_requests()
1636 int ceph_alloc_readdir_reply_buffer(struct ceph_mds_request *req, in ceph_alloc_readdir_reply_buffer() argument
1640 struct ceph_mds_reply_info_parsed *rinfo = &req->r_reply_info; in ceph_alloc_readdir_reply_buffer()
1641 struct ceph_mount_options *opt = req->r_mdsc->fsc->mount_options; in ceph_alloc_readdir_reply_buffer()
1667 req->r_num_caps = num_entries + 1; in ceph_alloc_readdir_reply_buffer()
1668 req->r_args.readdir.max_entries = cpu_to_le32(num_entries); in ceph_alloc_readdir_reply_buffer()
1669 req->r_args.readdir.max_bytes = cpu_to_le32(opt->max_readdir_bytes); in ceph_alloc_readdir_reply_buffer()
1679 struct ceph_mds_request *req = kzalloc(sizeof(*req), GFP_NOFS); in ceph_mdsc_create_request() local
1681 if (!req) in ceph_mdsc_create_request()
1684 mutex_init(&req->r_fill_mutex); in ceph_mdsc_create_request()
1685 req->r_mdsc = mdsc; in ceph_mdsc_create_request()
1686 req->r_started = jiffies; in ceph_mdsc_create_request()
1687 req->r_resend_mds = -1; in ceph_mdsc_create_request()
1688 INIT_LIST_HEAD(&req->r_unsafe_dir_item); in ceph_mdsc_create_request()
1689 INIT_LIST_HEAD(&req->r_unsafe_target_item); in ceph_mdsc_create_request()
1690 req->r_fmode = -1; in ceph_mdsc_create_request()
1691 kref_init(&req->r_kref); in ceph_mdsc_create_request()
1692 RB_CLEAR_NODE(&req->r_node); in ceph_mdsc_create_request()
1693 INIT_LIST_HEAD(&req->r_wait); in ceph_mdsc_create_request()
1694 init_completion(&req->r_completion); in ceph_mdsc_create_request()
1695 init_completion(&req->r_safe_completion); in ceph_mdsc_create_request()
1696 INIT_LIST_HEAD(&req->r_unsafe_item); in ceph_mdsc_create_request()
1698 req->r_stamp = current_fs_time(mdsc->fsc->sb); in ceph_mdsc_create_request()
1700 req->r_op = op; in ceph_mdsc_create_request()
1701 req->r_direct_mode = mode; in ceph_mdsc_create_request()
1702 return req; in ceph_mdsc_create_request()
1894 struct ceph_mds_request *req, in create_request_message() argument
1909 ret = set_request_path_attr(req->r_inode, req->r_dentry, in create_request_message()
1910 req->r_path1, req->r_ino1.ino, in create_request_message()
1917 ret = set_request_path_attr(NULL, req->r_old_dentry, in create_request_message()
1918 req->r_path2, req->r_ino2.ino, in create_request_message()
1931 (!!req->r_inode_drop + !!req->r_dentry_drop + in create_request_message()
1932 !!req->r_old_inode_drop + !!req->r_old_dentry_drop); in create_request_message()
1933 if (req->r_dentry_drop) in create_request_message()
1934 len += req->r_dentry->d_name.len; in create_request_message()
1935 if (req->r_old_dentry_drop) in create_request_message()
1936 len += req->r_old_dentry->d_name.len; in create_request_message()
1945 msg->hdr.tid = cpu_to_le64(req->r_tid); in create_request_message()
1952 head->op = cpu_to_le32(req->r_op); in create_request_message()
1953 head->caller_uid = cpu_to_le32(from_kuid(&init_user_ns, req->r_uid)); in create_request_message()
1954 head->caller_gid = cpu_to_le32(from_kgid(&init_user_ns, req->r_gid)); in create_request_message()
1955 head->args = req->r_args; in create_request_message()
1961 req->r_request_release_offset = p - msg->front.iov_base; in create_request_message()
1965 if (req->r_inode_drop) in create_request_message()
1967 req->r_inode ? req->r_inode : d_inode(req->r_dentry), in create_request_message()
1968 mds, req->r_inode_drop, req->r_inode_unless, 0); in create_request_message()
1969 if (req->r_dentry_drop) in create_request_message()
1970 releases += ceph_encode_dentry_release(&p, req->r_dentry, in create_request_message()
1971 mds, req->r_dentry_drop, req->r_dentry_unless); in create_request_message()
1972 if (req->r_old_dentry_drop) in create_request_message()
1973 releases += ceph_encode_dentry_release(&p, req->r_old_dentry, in create_request_message()
1974 mds, req->r_old_dentry_drop, req->r_old_dentry_unless); in create_request_message()
1975 if (req->r_old_inode_drop) in create_request_message()
1977 d_inode(req->r_old_dentry), in create_request_message()
1978 mds, req->r_old_inode_drop, req->r_old_inode_unless, 0); in create_request_message()
1982 p = msg->front.iov_base + req->r_request_release_offset; in create_request_message()
1990 ceph_encode_timespec(&ts, &req->r_stamp); in create_request_message()
1998 if (req->r_pagelist) { in create_request_message()
1999 struct ceph_pagelist *pagelist = req->r_pagelist; in create_request_message()
2024 struct ceph_mds_request *req) in complete_request() argument
2026 if (req->r_callback) in complete_request()
2027 req->r_callback(mdsc, req); in complete_request()
2029 complete_all(&req->r_completion); in complete_request()
2036 struct ceph_mds_request *req, in __prepare_send_request() argument
2043 req->r_attempts++; in __prepare_send_request()
2044 if (req->r_inode) { in __prepare_send_request()
2046 ceph_get_cap_for_mds(ceph_inode(req->r_inode), mds); in __prepare_send_request()
2049 req->r_sent_on_mseq = cap->mseq; in __prepare_send_request()
2051 req->r_sent_on_mseq = -1; in __prepare_send_request()
2053 dout("prepare_send_request %p tid %lld %s (attempt %d)\n", req, in __prepare_send_request()
2054 req->r_tid, ceph_mds_op_name(req->r_op), req->r_attempts); in __prepare_send_request()
2056 if (req->r_got_unsafe) { in __prepare_send_request()
2064 msg = req->r_request; in __prepare_send_request()
2071 if (req->r_target_inode) in __prepare_send_request()
2072 rhead->ino = cpu_to_le64(ceph_ino(req->r_target_inode)); in __prepare_send_request()
2074 rhead->num_retry = req->r_attempts - 1; in __prepare_send_request()
2080 p = msg->front.iov_base + req->r_request_release_offset; in __prepare_send_request()
2083 ceph_encode_timespec(&ts, &req->r_stamp); in __prepare_send_request()
2092 if (req->r_request) { in __prepare_send_request()
2093 ceph_msg_put(req->r_request); in __prepare_send_request()
2094 req->r_request = NULL; in __prepare_send_request()
2096 msg = create_request_message(mdsc, req, mds, drop_cap_releases); in __prepare_send_request()
2098 req->r_err = PTR_ERR(msg); in __prepare_send_request()
2101 req->r_request = msg; in __prepare_send_request()
2105 if (req->r_got_unsafe) in __prepare_send_request()
2107 if (req->r_locked_dir) in __prepare_send_request()
2110 rhead->num_fwd = req->r_num_fwd; in __prepare_send_request()
2111 rhead->num_retry = req->r_attempts - 1; in __prepare_send_request()
2114 dout(" r_locked_dir = %p\n", req->r_locked_dir); in __prepare_send_request()
2122 struct ceph_mds_request *req) in __do_request() argument
2128 if (req->r_err || req->r_got_result) { in __do_request()
2129 if (req->r_aborted) in __do_request()
2130 __unregister_request(mdsc, req); in __do_request()
2134 if (req->r_timeout && in __do_request()
2135 time_after_eq(jiffies, req->r_started + req->r_timeout)) { in __do_request()
2146 put_request_session(req); in __do_request()
2148 mds = __choose_mds(mdsc, req); in __do_request()
2157 list_add(&req->r_wait, &mdsc->waiting_for_map); in __do_request()
2170 req->r_session = get_session(session); in __do_request()
2183 list_add(&req->r_wait, &session->s_waiting); in __do_request()
2188 req->r_resend_mds = -1; /* forget any previous mds hint */ in __do_request()
2190 if (req->r_request_started == 0) /* note request start time */ in __do_request()
2191 req->r_request_started = jiffies; in __do_request()
2193 err = __prepare_send_request(mdsc, req, mds, false); in __do_request()
2195 ceph_msg_get(req->r_request); in __do_request()
2196 ceph_con_send(&session->s_con, req->r_request); in __do_request()
2204 req->r_err = err; in __do_request()
2205 complete_request(mdsc, req); in __do_request()
2206 __unregister_request(mdsc, req); in __do_request()
2218 struct ceph_mds_request *req; in __wake_requests() local
2224 req = list_entry(tmp_list.next, in __wake_requests()
2226 list_del_init(&req->r_wait); in __wake_requests()
2227 dout(" wake request %p tid %llu\n", req, req->r_tid); in __wake_requests()
2228 __do_request(mdsc, req); in __wake_requests()
2238 struct ceph_mds_request *req; in kick_requests() local
2243 req = rb_entry(p, struct ceph_mds_request, r_node); in kick_requests()
2245 if (req->r_got_unsafe) in kick_requests()
2247 if (req->r_attempts > 0) in kick_requests()
2249 if (req->r_session && in kick_requests()
2250 req->r_session->s_mds == mds) { in kick_requests()
2251 dout(" kicking tid %llu\n", req->r_tid); in kick_requests()
2252 list_del_init(&req->r_wait); in kick_requests()
2253 __do_request(mdsc, req); in kick_requests()
2259 struct ceph_mds_request *req) in ceph_mdsc_submit_request() argument
2261 dout("submit_request on %p\n", req); in ceph_mdsc_submit_request()
2263 __register_request(mdsc, req, NULL); in ceph_mdsc_submit_request()
2264 __do_request(mdsc, req); in ceph_mdsc_submit_request()
2274 struct ceph_mds_request *req) in ceph_mdsc_do_request() argument
2278 dout("do_request on %p\n", req); in ceph_mdsc_do_request()
2281 if (req->r_inode) in ceph_mdsc_do_request()
2282 ceph_get_cap_refs(ceph_inode(req->r_inode), CEPH_CAP_PIN); in ceph_mdsc_do_request()
2283 if (req->r_locked_dir) in ceph_mdsc_do_request()
2284 ceph_get_cap_refs(ceph_inode(req->r_locked_dir), CEPH_CAP_PIN); in ceph_mdsc_do_request()
2285 if (req->r_old_dentry_dir) in ceph_mdsc_do_request()
2286 ceph_get_cap_refs(ceph_inode(req->r_old_dentry_dir), in ceph_mdsc_do_request()
2291 __register_request(mdsc, req, dir); in ceph_mdsc_do_request()
2292 __do_request(mdsc, req); in ceph_mdsc_do_request()
2294 if (req->r_err) { in ceph_mdsc_do_request()
2295 err = req->r_err; in ceph_mdsc_do_request()
2302 if (!req->r_timeout && req->r_wait_for_completion) { in ceph_mdsc_do_request()
2303 err = req->r_wait_for_completion(mdsc, req); in ceph_mdsc_do_request()
2306 &req->r_completion, in ceph_mdsc_do_request()
2307 ceph_timeout_jiffies(req->r_timeout)); in ceph_mdsc_do_request()
2319 if (req->r_got_result) { in ceph_mdsc_do_request()
2320 err = le32_to_cpu(req->r_reply_info.head->result); in ceph_mdsc_do_request()
2322 dout("aborted request %lld with %d\n", req->r_tid, err); in ceph_mdsc_do_request()
2329 mutex_lock(&req->r_fill_mutex); in ceph_mdsc_do_request()
2330 req->r_err = err; in ceph_mdsc_do_request()
2331 req->r_aborted = true; in ceph_mdsc_do_request()
2332 mutex_unlock(&req->r_fill_mutex); in ceph_mdsc_do_request()
2334 if (req->r_locked_dir && in ceph_mdsc_do_request()
2335 (req->r_op & CEPH_MDS_OP_WRITE)) in ceph_mdsc_do_request()
2336 ceph_invalidate_dir_request(req); in ceph_mdsc_do_request()
2338 err = req->r_err; in ceph_mdsc_do_request()
2343 dout("do_request %p done, result %d\n", req, err); in ceph_mdsc_do_request()
2351 void ceph_invalidate_dir_request(struct ceph_mds_request *req) in ceph_invalidate_dir_request() argument
2353 struct inode *inode = req->r_locked_dir; in ceph_invalidate_dir_request()
2358 if (req->r_dentry) in ceph_invalidate_dir_request()
2359 ceph_invalidate_dentry_lease(req->r_dentry); in ceph_invalidate_dir_request()
2360 if (req->r_old_dentry) in ceph_invalidate_dir_request()
2361 ceph_invalidate_dentry_lease(req->r_old_dentry); in ceph_invalidate_dir_request()
2374 struct ceph_mds_request *req; in handle_reply() local
2391 req = lookup_get_request(mdsc, tid); in handle_reply()
2392 if (!req) { in handle_reply()
2397 dout("handle_reply %p\n", req); in handle_reply()
2400 if (req->r_session != session) { in handle_reply()
2403 req->r_session ? req->r_session->s_mds : -1); in handle_reply()
2409 if ((req->r_got_unsafe && !head->safe) || in handle_reply()
2410 (req->r_got_safe && head->safe)) { in handle_reply()
2416 if (req->r_got_safe) { in handle_reply()
2433 dout("got ESTALE on request %llu", req->r_tid); in handle_reply()
2434 req->r_resend_mds = -1; in handle_reply()
2435 if (req->r_direct_mode != USE_AUTH_MDS) { in handle_reply()
2437 req->r_direct_mode = USE_AUTH_MDS; in handle_reply()
2438 __do_request(mdsc, req); in handle_reply()
2442 int mds = __choose_mds(mdsc, req); in handle_reply()
2443 if (mds >= 0 && mds != req->r_session->s_mds) { in handle_reply()
2445 __do_request(mdsc, req); in handle_reply()
2450 dout("have to return ESTALE on request %llu", req->r_tid); in handle_reply()
2455 req->r_got_safe = true; in handle_reply()
2456 __unregister_request(mdsc, req); in handle_reply()
2458 if (req->r_got_unsafe) { in handle_reply()
2475 req->r_got_unsafe = true; in handle_reply()
2476 list_add_tail(&req->r_unsafe_item, &req->r_session->s_unsafe); in handle_reply()
2477 if (req->r_unsafe_dir) { in handle_reply()
2479 ceph_inode(req->r_unsafe_dir); in handle_reply()
2481 list_add_tail(&req->r_unsafe_dir_item, in handle_reply()
2488 rinfo = &req->r_reply_info; in handle_reply()
2513 mutex_lock(&req->r_fill_mutex); in handle_reply()
2514 current->journal_info = req; in handle_reply()
2515 err = ceph_fill_trace(mdsc->fsc->sb, req, req->r_session); in handle_reply()
2517 if (result == 0 && (req->r_op == CEPH_MDS_OP_READDIR || in handle_reply()
2518 req->r_op == CEPH_MDS_OP_LSSNAP)) in handle_reply()
2519 ceph_readdir_prepopulate(req, req->r_session); in handle_reply()
2520 ceph_unreserve_caps(mdsc, &req->r_caps_reservation); in handle_reply()
2523 mutex_unlock(&req->r_fill_mutex); in handle_reply()
2529 if (err == 0 && req->r_got_unsafe && req->r_target_inode) { in handle_reply()
2530 struct ceph_inode_info *ci = ceph_inode(req->r_target_inode); in handle_reply()
2532 list_add_tail(&req->r_unsafe_target_item, &ci->i_unsafe_iops); in handle_reply()
2537 if (!req->r_aborted) { in handle_reply()
2539 req->r_err = err; in handle_reply()
2541 req->r_reply = ceph_msg_get(msg); in handle_reply()
2542 req->r_got_result = true; in handle_reply()
2552 complete_request(mdsc, req); in handle_reply()
2554 ceph_mdsc_put_request(req); in handle_reply()
2567 struct ceph_mds_request *req; in handle_forward() local
2580 req = lookup_get_request(mdsc, tid); in handle_forward()
2581 if (!req) { in handle_forward()
2586 if (req->r_aborted) { in handle_forward()
2588 __unregister_request(mdsc, req); in handle_forward()
2589 } else if (fwd_seq <= req->r_num_fwd) { in handle_forward()
2591 tid, next_mds, req->r_num_fwd, fwd_seq); in handle_forward()
2595 BUG_ON(req->r_err); in handle_forward()
2596 BUG_ON(req->r_got_result); in handle_forward()
2597 req->r_attempts = 0; in handle_forward()
2598 req->r_num_fwd = fwd_seq; in handle_forward()
2599 req->r_resend_mds = next_mds; in handle_forward()
2600 put_request_session(req); in handle_forward()
2601 __do_request(mdsc, req); in handle_forward()
2603 ceph_mdsc_put_request(req); in handle_forward()
2738 struct ceph_mds_request *req, *nreq; in replay_unsafe_requests() local
2745 list_for_each_entry_safe(req, nreq, &session->s_unsafe, r_unsafe_item) { in replay_unsafe_requests()
2746 err = __prepare_send_request(mdsc, req, session->s_mds, true); in replay_unsafe_requests()
2748 ceph_msg_get(req->r_request); in replay_unsafe_requests()
2749 ceph_con_send(&session->s_con, req->r_request); in replay_unsafe_requests()
2759 req = rb_entry(p, struct ceph_mds_request, r_node); in replay_unsafe_requests()
2761 if (req->r_got_unsafe) in replay_unsafe_requests()
2763 if (req->r_attempts == 0) in replay_unsafe_requests()
2765 if (req->r_session && in replay_unsafe_requests()
2766 req->r_session->s_mds == session->s_mds) { in replay_unsafe_requests()
2767 err = __prepare_send_request(mdsc, req, in replay_unsafe_requests()
2770 ceph_msg_get(req->r_request); in replay_unsafe_requests()
2771 ceph_con_send(&session->s_con, req->r_request); in replay_unsafe_requests()
3493 struct ceph_mds_request *req; in wait_requests() local
3505 while ((req = __get_oldest_req(mdsc))) { in wait_requests()
3507 req->r_tid); in wait_requests()
3508 __unregister_request(mdsc, req); in wait_requests()
3540 struct ceph_mds_request *req = NULL, *nextreq; in wait_unsafe_requests() local
3546 req = __get_oldest_req(mdsc); in wait_unsafe_requests()
3547 while (req && req->r_tid <= want_tid) { in wait_unsafe_requests()
3549 n = rb_next(&req->r_node); in wait_unsafe_requests()
3554 if (req->r_op != CEPH_MDS_OP_SETFILELOCK && in wait_unsafe_requests()
3555 (req->r_op & CEPH_MDS_OP_WRITE)) { in wait_unsafe_requests()
3557 ceph_mdsc_get_request(req); in wait_unsafe_requests()
3562 req->r_tid, want_tid); in wait_unsafe_requests()
3563 wait_for_completion(&req->r_safe_completion); in wait_unsafe_requests()
3565 ceph_mdsc_put_request(req); in wait_unsafe_requests()
3575 req = nextreq; in wait_unsafe_requests()