• Home
  • Raw
  • Download

Lines Matching refs:req

14                                          struct ceph_mds_request *req);
67 struct ceph_mds_request *req; in ceph_lock_message() local
86 req = ceph_mdsc_create_request(mdsc, operation, USE_AUTH_MDS); in ceph_lock_message()
87 if (IS_ERR(req)) in ceph_lock_message()
88 return PTR_ERR(req); in ceph_lock_message()
89 req->r_inode = inode; in ceph_lock_message()
91 req->r_num_caps = 1; in ceph_lock_message()
106 req->r_args.filelock_change.rule = lock_type; in ceph_lock_message()
107 req->r_args.filelock_change.type = cmd; in ceph_lock_message()
108 req->r_args.filelock_change.owner = cpu_to_le64(owner); in ceph_lock_message()
109 req->r_args.filelock_change.pid = cpu_to_le64((u64)fl->fl_pid); in ceph_lock_message()
110 req->r_args.filelock_change.start = cpu_to_le64(fl->fl_start); in ceph_lock_message()
111 req->r_args.filelock_change.length = cpu_to_le64(length); in ceph_lock_message()
112 req->r_args.filelock_change.wait = wait; in ceph_lock_message()
115 req->r_wait_for_completion = ceph_lock_wait_for_completion; in ceph_lock_message()
117 err = ceph_mdsc_do_request(mdsc, inode, req); in ceph_lock_message()
119 fl->fl_pid = -le64_to_cpu(req->r_reply_info.filelock_reply->pid); in ceph_lock_message()
120 if (CEPH_LOCK_SHARED == req->r_reply_info.filelock_reply->type) in ceph_lock_message()
122 else if (CEPH_LOCK_EXCL == req->r_reply_info.filelock_reply->type) in ceph_lock_message()
127 fl->fl_start = le64_to_cpu(req->r_reply_info.filelock_reply->start); in ceph_lock_message()
128 length = le64_to_cpu(req->r_reply_info.filelock_reply->start) + in ceph_lock_message()
129 le64_to_cpu(req->r_reply_info.filelock_reply->length); in ceph_lock_message()
136 ceph_mdsc_put_request(req); in ceph_lock_message()
145 struct ceph_mds_request *req) in ceph_lock_wait_for_completion() argument
148 struct inode *inode = req->r_inode; in ceph_lock_wait_for_completion()
151 BUG_ON(req->r_op != CEPH_MDS_OP_SETFILELOCK); in ceph_lock_wait_for_completion()
152 if (req->r_args.filelock_change.rule == CEPH_LOCK_FCNTL) in ceph_lock_wait_for_completion()
154 else if (req->r_args.filelock_change.rule == CEPH_LOCK_FLOCK) in ceph_lock_wait_for_completion()
158 BUG_ON(req->r_args.filelock_change.type == CEPH_LOCK_UNLOCK); in ceph_lock_wait_for_completion()
160 err = wait_for_completion_interruptible(&req->r_completion); in ceph_lock_wait_for_completion()
165 req->r_tid); in ceph_lock_wait_for_completion()
168 if (test_bit(CEPH_MDS_R_GOT_RESULT, &req->r_req_flags)) { in ceph_lock_wait_for_completion()
176 mutex_lock(&req->r_fill_mutex); in ceph_lock_wait_for_completion()
177 req->r_err = err; in ceph_lock_wait_for_completion()
178 set_bit(CEPH_MDS_R_ABORTED, &req->r_req_flags); in ceph_lock_wait_for_completion()
179 mutex_unlock(&req->r_fill_mutex); in ceph_lock_wait_for_completion()
181 if (!req->r_session) { in ceph_lock_wait_for_completion()
199 intr_req->r_args.filelock_change = req->r_args.filelock_change; in ceph_lock_wait_for_completion()
209 wait_for_completion_killable(&req->r_safe_completion); in ceph_lock_wait_for_completion()