}
/**
- * Implementation of ->l_completion_ast() for a client that doesn't wait
- * until lock is granted. Suitable for locks enqueued through ptlrpcd or
+ * Implementation of ->l_completion_ast() for a client, that doesn't wait
+ * until lock is granted. Suitable for locks enqueued through ptlrpcd, of
* other threads that cannot block for long.
*/
int ldlm_completion_ast_async(struct ldlm_lock *lock, int flags, void *data)
LDLM_DEBUG(lock, "client-side enqueue returned a blocked lock, "
"going forward");
ldlm_lock_dump(D_OTHER, lock, 0);
+ ldlm_reprocess_all(lock->l_resource);
RETURN(0);
}
}
LDLM_DEBUG(lock, "sending request");
+
rc = ptlrpc_queue_wait(req);
+
err = ldlm_cli_enqueue_fini(exp, req, einfo->ei_type, policy ? 1 : 0,
einfo->ei_mode, flags, lvb, lvb_len,
lvb_swabber, lockh, rc);
ptlrpc_request_set_replen(req);
if (flags & LDLM_FL_ASYNC) {
- ptlrpcd_add_req(req);
+ ptlrpcd_add_req(req, PSCOPE_OTHER);
sent = count;
GOTO(out, 0);
} else {
__u64 old_slv, new_slv;
__u32 new_limit;
ENTRY;
-
if (unlikely(!req->rq_import || !req->rq_import->imp_obd ||
!imp_connect_lru_resize(req->rq_import)))
{
*/
page_nr = lock->l_weigh_ast(lock);
} else {
- struct ldlm_extent *l_extent;
+ struct ldlm_extent *l_extent;
- /*
- * For all extent locks cost is 1 + number of pages in
- * their extent.
- */
- l_extent = &lock->l_policy_data.l_extent;
+ /*
+ * For all extent locks cost is 1 + number of pages in
+ * their extent.
+ */
+ l_extent = &lock->l_policy_data.l_extent;
page_nr = l_extent->end - l_extent->start;
- do_div(page_nr, CFS_PAGE_SIZE);
+ do_div(page_nr, CFS_PAGE_SIZE);
}
lock_cost = 1 + page_nr;
} else {
aa = ptlrpc_req_async_args(req);
aa->lock_handle = body->lock_handle[0];
req->rq_interpret_reply = (ptlrpc_interpterer_t)replay_lock_interpret;
- ptlrpcd_add_req(req);
+ ptlrpcd_add_req(req, PSCOPE_OTHER);
RETURN(0);
}