• Home
  • Raw
  • Download

Lines Matching refs:req

123 static void nlmclnt_setlockargs(struct nlm_rqst *req, struct file_lock *fl)  in nlmclnt_setlockargs()  argument
125 struct nlm_args *argp = &req->a_args; in nlmclnt_setlockargs()
132 lock->oh.data = req->a_owner; in nlmclnt_setlockargs()
133 lock->oh.len = snprintf(req->a_owner, sizeof(req->a_owner), "%u@%s", in nlmclnt_setlockargs()
142 static void nlmclnt_release_lockargs(struct nlm_rqst *req) in nlmclnt_release_lockargs() argument
144 BUG_ON(req->a_args.lock.fl.fl_ops != NULL); in nlmclnt_release_lockargs()
251 nlmclnt_call(struct rpc_cred *cred, struct nlm_rqst *req, u32 proc) in nlmclnt_call() argument
253 struct nlm_host *host = req->a_host; in nlmclnt_call()
255 struct nlm_args *argp = &req->a_args; in nlmclnt_call()
256 struct nlm_res *resp = &req->a_res; in nlmclnt_call()
328 static struct rpc_task *__nlm_async_call(struct nlm_rqst *req, u32 proc, struct rpc_message *msg, c… in __nlm_async_call() argument
330 struct nlm_host *host = req->a_host; in __nlm_async_call()
335 .callback_data = req, in __nlm_async_call()
352 tk_ops->rpc_release(req); in __nlm_async_call()
356 static int nlm_do_async_call(struct nlm_rqst *req, u32 proc, struct rpc_message *msg, const struct … in nlm_do_async_call() argument
360 task = __nlm_async_call(req, proc, msg, tk_ops); in nlm_do_async_call()
370 int nlm_async_call(struct nlm_rqst *req, u32 proc, const struct rpc_call_ops *tk_ops) in nlm_async_call() argument
373 .rpc_argp = &req->a_args, in nlm_async_call()
374 .rpc_resp = &req->a_res, in nlm_async_call()
376 return nlm_do_async_call(req, proc, &msg, tk_ops); in nlm_async_call()
379 int nlm_async_reply(struct nlm_rqst *req, u32 proc, const struct rpc_call_ops *tk_ops) in nlm_async_reply() argument
382 .rpc_argp = &req->a_res, in nlm_async_reply()
384 return nlm_do_async_call(req, proc, &msg, tk_ops); in nlm_async_reply()
395 static int nlmclnt_async_call(struct rpc_cred *cred, struct nlm_rqst *req, u32 proc, const struct r… in nlmclnt_async_call() argument
398 .rpc_argp = &req->a_args, in nlmclnt_async_call()
399 .rpc_resp = &req->a_res, in nlmclnt_async_call()
405 task = __nlm_async_call(req, proc, &msg, tk_ops); in nlmclnt_async_call()
417 nlmclnt_test(struct nlm_rqst *req, struct file_lock *fl) in nlmclnt_test() argument
421 status = nlmclnt_call(nfs_file_cred(fl->fl_file), req, NLMPROC_TEST); in nlmclnt_test()
425 switch (req->a_res.status) { in nlmclnt_test()
433 fl->fl_start = req->a_res.lock.fl.fl_start; in nlmclnt_test()
434 fl->fl_end = req->a_res.lock.fl.fl_end; in nlmclnt_test()
435 fl->fl_type = req->a_res.lock.fl.fl_type; in nlmclnt_test()
439 status = nlm_stat_to_errno(req->a_res.status); in nlmclnt_test()
442 nlm_release_call(req); in nlmclnt_test()
510 nlmclnt_lock(struct nlm_rqst *req, struct file_lock *fl) in nlmclnt_lock() argument
513 struct nlm_host *host = req->a_host; in nlmclnt_lock()
514 struct nlm_res *resp = &req->a_res; in nlmclnt_lock()
539 status = nlmclnt_call(cred, req, NLMPROC_LOCK); in nlmclnt_lock()
548 status = nlmclnt_block(block, req, NLMCLNT_POLL_TIMEOUT); in nlmclnt_lock()
559 if (!req->a_args.block) in nlmclnt_lock()
561 if (nlmclnt_cancel(host, req->a_args.block, fl) == 0) in nlmclnt_lock()
594 nlm_release_call(req); in nlmclnt_lock()
608 nlmclnt_async_call(cred, req, NLMPROC_UNLOCK, &nlmclnt_unlock_ops); in nlmclnt_lock()
618 struct nlm_rqst reqst, *req; in nlmclnt_reclaim() local
621 req = &reqst; in nlmclnt_reclaim()
622 memset(req, 0, sizeof(*req)); in nlmclnt_reclaim()
623 locks_init_lock(&req->a_args.lock.fl); in nlmclnt_reclaim()
624 locks_init_lock(&req->a_res.lock.fl); in nlmclnt_reclaim()
625 req->a_host = host; in nlmclnt_reclaim()
626 req->a_flags = 0; in nlmclnt_reclaim()
629 nlmclnt_setlockargs(req, fl); in nlmclnt_reclaim()
630 req->a_args.reclaim = 1; in nlmclnt_reclaim()
632 status = nlmclnt_call(nfs_file_cred(fl->fl_file), req, NLMPROC_LOCK); in nlmclnt_reclaim()
633 if (status >= 0 && req->a_res.status == nlm_granted) in nlmclnt_reclaim()
638 status, ntohl(req->a_res.status)); in nlmclnt_reclaim()
659 nlmclnt_unlock(struct nlm_rqst *req, struct file_lock *fl) in nlmclnt_unlock() argument
661 struct nlm_host *host = req->a_host; in nlmclnt_unlock()
662 struct nlm_res *resp = &req->a_res; in nlmclnt_unlock()
681 atomic_inc(&req->a_count); in nlmclnt_unlock()
682 status = nlmclnt_async_call(nfs_file_cred(fl->fl_file), req, in nlmclnt_unlock()
695 nlm_release_call(req); in nlmclnt_unlock()
701 struct nlm_rqst *req = data; in nlmclnt_unlock_callback() local
702 u32 status = ntohl(req->a_res.status); in nlmclnt_unlock_callback()
721 nlm_rebind_host(req->a_host); in nlmclnt_unlock_callback()
739 struct nlm_rqst *req; in nlmclnt_cancel() local
745 req = nlm_alloc_call(nlm_get_host(host)); in nlmclnt_cancel()
746 if (!req) in nlmclnt_cancel()
748 req->a_flags = RPC_TASK_ASYNC; in nlmclnt_cancel()
750 nlmclnt_setlockargs(req, fl); in nlmclnt_cancel()
751 req->a_args.block = block; in nlmclnt_cancel()
753 atomic_inc(&req->a_count); in nlmclnt_cancel()
754 status = nlmclnt_async_call(nfs_file_cred(fl->fl_file), req, in nlmclnt_cancel()
756 if (status == 0 && req->a_res.status == nlm_lck_denied) in nlmclnt_cancel()
758 nlm_release_call(req); in nlmclnt_cancel()
764 struct nlm_rqst *req = data; in nlmclnt_cancel_callback() local
765 u32 status = ntohl(req->a_res.status); in nlmclnt_cancel_callback()
798 if (req->a_retries++ >= NLMCLNT_MAX_RETRIES) in nlmclnt_cancel_callback()
801 nlm_rebind_host(req->a_host); in nlmclnt_cancel_callback()