• Home
  • Raw
  • Download

Lines Matching refs:op

31 	struct orangefs_kernel_op_s *op, *tmp;  in purge_waiting_ops()  local
34 list_for_each_entry_safe(op, tmp, &orangefs_request_list, list) { in purge_waiting_ops()
37 llu(op->tag), in purge_waiting_ops()
38 get_opname_string(op)); in purge_waiting_ops()
39 set_op_state_purged(op); in purge_waiting_ops()
43 get_opname_string(op), in purge_waiting_ops()
44 op->op_state, in purge_waiting_ops()
60 int service_operation(struct orangefs_kernel_op_s *op, in service_operation() argument
69 op->upcall.tgid = current->tgid; in service_operation()
70 op->upcall.pid = current->pid; in service_operation()
73 op->downcall.status = 0; in service_operation()
78 op, in service_operation()
98 op->downcall.status = ret; in service_operation()
108 spin_lock(&op->lock); in service_operation()
109 set_op_state_waiting(op); in service_operation()
113 get_opname_string(op), in service_operation()
114 op->op_state, in service_operation()
118 list_add(&op->list, &orangefs_request_list); in service_operation()
120 list_add_tail(&op->list, &orangefs_request_list); in service_operation()
121 spin_unlock(&op->lock); in service_operation()
131 if (op->upcall.type == ORANGEFS_VFS_OP_FS_UMOUNT) in service_operation()
141 ret = wait_for_matching_downcall(op, timeout, in service_operation()
148 op); in service_operation()
152 spin_unlock(&op->lock); in service_operation()
153 op->downcall.status = in service_operation()
154 orangefs_normalize_to_errno(op->downcall.status); in service_operation()
155 ret = op->downcall.status; in service_operation()
170 orangefs_clean_up_interrupted_operation(op); in service_operation()
172 op->downcall.status = ret; in service_operation()
175 op->attempts++; in service_operation()
180 llu(op->tag), in service_operation()
182 op->attempts); in service_operation()
189 if (!op->uses_shared_memory) in service_operation()
199 op); in service_operation()
204 bool orangefs_cancel_op_in_progress(struct orangefs_kernel_op_s *op) in orangefs_cancel_op_in_progress() argument
206 u64 tag = op->tag; in orangefs_cancel_op_in_progress()
207 if (!op_state_in_progress(op)) in orangefs_cancel_op_in_progress()
210 op->slot_to_free = op->upcall.req.io.buf_index; in orangefs_cancel_op_in_progress()
211 memset(&op->upcall, 0, sizeof(op->upcall)); in orangefs_cancel_op_in_progress()
212 memset(&op->downcall, 0, sizeof(op->downcall)); in orangefs_cancel_op_in_progress()
213 op->upcall.type = ORANGEFS_VFS_OP_CANCEL; in orangefs_cancel_op_in_progress()
214 op->upcall.req.cancel.op_tag = tag; in orangefs_cancel_op_in_progress()
215 op->downcall.type = ORANGEFS_VFS_OP_INVALID; in orangefs_cancel_op_in_progress()
216 op->downcall.status = -1; in orangefs_cancel_op_in_progress()
217 orangefs_new_tag(op); in orangefs_cancel_op_in_progress()
225 spin_lock(&op->lock); in orangefs_cancel_op_in_progress()
226 set_op_state_waiting(op); in orangefs_cancel_op_in_progress()
230 get_opname_string(op), in orangefs_cancel_op_in_progress()
231 op->op_state, in orangefs_cancel_op_in_progress()
233 list_add(&op->list, &orangefs_request_list); in orangefs_cancel_op_in_progress()
234 spin_unlock(&op->lock); in orangefs_cancel_op_in_progress()
247 orangefs_clean_up_interrupted_operation(struct orangefs_kernel_op_s *op) in orangefs_clean_up_interrupted_operation() argument
260 op->op_state |= OP_VFS_STATE_GIVEN_UP; in orangefs_clean_up_interrupted_operation()
262 if (list_empty(&op->list)) { in orangefs_clean_up_interrupted_operation()
264 BUG_ON(op_state_serviced(op)); in orangefs_clean_up_interrupted_operation()
265 spin_unlock(&op->lock); in orangefs_clean_up_interrupted_operation()
266 wait_for_completion(&op->waitq); in orangefs_clean_up_interrupted_operation()
267 } else if (op_state_waiting(op)) { in orangefs_clean_up_interrupted_operation()
272 spin_unlock(&op->lock); in orangefs_clean_up_interrupted_operation()
274 list_del_init(&op->list); in orangefs_clean_up_interrupted_operation()
278 op); in orangefs_clean_up_interrupted_operation()
279 } else if (op_state_in_progress(op)) { in orangefs_clean_up_interrupted_operation()
281 spin_unlock(&op->lock); in orangefs_clean_up_interrupted_operation()
283 list_del_init(&op->list); in orangefs_clean_up_interrupted_operation()
288 op); in orangefs_clean_up_interrupted_operation()
290 spin_unlock(&op->lock); in orangefs_clean_up_interrupted_operation()
292 op->op_state); in orangefs_clean_up_interrupted_operation()
294 reinit_completion(&op->waitq); in orangefs_clean_up_interrupted_operation()
314 static int wait_for_matching_downcall(struct orangefs_kernel_op_s *op, in wait_for_matching_downcall() argument
327 n = wait_for_completion_interruptible_timeout(&op->waitq, in wait_for_matching_downcall()
330 n = wait_for_completion_killable_timeout(&op->waitq, timeout); in wait_for_matching_downcall()
332 spin_lock(&op->lock); in wait_for_matching_downcall()
334 if (op_state_serviced(op)) in wait_for_matching_downcall()
341 llu(op->tag), in wait_for_matching_downcall()
342 op); in wait_for_matching_downcall()
345 if (op_state_purged(op)) { in wait_for_matching_downcall()
349 llu(op->tag), in wait_for_matching_downcall()
350 op, in wait_for_matching_downcall()
351 op->attempts); in wait_for_matching_downcall()
352 return (op->attempts < ORANGEFS_PURGE_RETRY_COUNT) ? in wait_for_matching_downcall()
360 llu(op->tag), in wait_for_matching_downcall()
361 op, in wait_for_matching_downcall()
362 op->attempts); in wait_for_matching_downcall()