• Home
  • Raw
  • Download

Lines Matching refs:cb

344 				    const struct nfsd4_callback *cb,  in encode_cb_sequence4args()  argument
347 struct nfsd4_session *session = cb->cb_clp->cl_cb_session; in encode_cb_sequence4args()
388 struct nfsd4_callback *cb) in decode_cb_sequence4resok() argument
390 struct nfsd4_session *session = cb->cb_clp->cl_cb_session; in decode_cb_sequence4resok()
426 cb->cb_seq_status = status; in decode_cb_sequence4resok()
434 struct nfsd4_callback *cb) in decode_cb_sequence4res() argument
438 if (cb->cb_clp->cl_minorversion == 0) in decode_cb_sequence4res()
441 status = decode_cb_op_status(xdr, OP_CB_SEQUENCE, &cb->cb_seq_status); in decode_cb_sequence4res()
442 if (unlikely(status || cb->cb_seq_status)) in decode_cb_sequence4res()
445 return decode_cb_sequence4resok(xdr, cb); in decode_cb_sequence4res()
472 const struct nfsd4_callback *cb = data; in nfs4_xdr_enc_cb_recall() local
473 const struct nfs4_delegation *dp = cb_to_delegation(cb); in nfs4_xdr_enc_cb_recall()
475 .ident = cb->cb_clp->cl_cb_ident, in nfs4_xdr_enc_cb_recall()
476 .minorversion = cb->cb_clp->cl_minorversion, in nfs4_xdr_enc_cb_recall()
480 encode_cb_sequence4args(xdr, cb, &hdr); in nfs4_xdr_enc_cb_recall()
508 struct nfsd4_callback *cb = data; in nfs4_xdr_dec_cb_recall() local
516 status = decode_cb_sequence4res(xdr, cb); in nfs4_xdr_dec_cb_recall()
517 if (unlikely(status || cb->cb_seq_status)) in nfs4_xdr_dec_cb_recall()
520 return decode_cb_op_status(xdr, OP_CB_RECALL, &cb->cb_status); in nfs4_xdr_dec_cb_recall()
580 const struct nfsd4_callback *cb = data; in nfs4_xdr_enc_cb_layout() local
582 container_of(cb, struct nfs4_layout_stateid, ls_recall); in nfs4_xdr_enc_cb_layout()
585 .minorversion = cb->cb_clp->cl_minorversion, in nfs4_xdr_enc_cb_layout()
589 encode_cb_sequence4args(xdr, cb, &hdr); in nfs4_xdr_enc_cb_layout()
598 struct nfsd4_callback *cb = data; in nfs4_xdr_dec_cb_layout() local
606 status = decode_cb_sequence4res(xdr, cb); in nfs4_xdr_dec_cb_layout()
607 if (unlikely(status || cb->cb_seq_status)) in nfs4_xdr_dec_cb_layout()
610 return decode_cb_op_status(xdr, OP_CB_LAYOUTRECALL, &cb->cb_status); in nfs4_xdr_dec_cb_layout()
627 const struct nfsd4_callback *cb = data; in nfs4_xdr_enc_cb_notify_lock() local
629 container_of(cb, struct nfsd4_blocked_lock, nbl_cb); in nfs4_xdr_enc_cb_notify_lock()
633 .minorversion = cb->cb_clp->cl_minorversion, in nfs4_xdr_enc_cb_notify_lock()
641 encode_cb_sequence4args(xdr, cb, &hdr); in nfs4_xdr_enc_cb_notify_lock()
656 struct nfsd4_callback *cb = data; in nfs4_xdr_dec_cb_notify_lock() local
664 status = decode_cb_sequence4res(xdr, cb); in nfs4_xdr_dec_cb_notify_lock()
665 if (unlikely(status || cb->cb_seq_status)) in nfs4_xdr_dec_cb_notify_lock()
668 return decode_cb_op_status(xdr, OP_CB_NOTIFY_LOCK, &cb->cb_status); in nfs4_xdr_dec_cb_notify_lock()
733 const struct nfsd4_callback *cb = data; in nfs4_xdr_enc_cb_offload() local
735 container_of(cb, struct nfsd4_copy, cp_cb); in nfs4_xdr_enc_cb_offload()
738 .minorversion = cb->cb_clp->cl_minorversion, in nfs4_xdr_enc_cb_offload()
742 encode_cb_sequence4args(xdr, cb, &hdr); in nfs4_xdr_enc_cb_offload()
751 struct nfsd4_callback *cb = data; in nfs4_xdr_dec_cb_offload() local
759 status = decode_cb_sequence4res(xdr, cb); in nfs4_xdr_dec_cb_offload()
760 if (unlikely(status || cb->cb_seq_status)) in nfs4_xdr_dec_cb_offload()
763 return decode_cb_op_status(xdr, OP_CB_OFFLOAD, &cb->cb_status); in nfs4_xdr_dec_cb_offload()
841 static bool nfsd4_queue_cb(struct nfsd4_callback *cb) in nfsd4_queue_cb() argument
843 return queue_work(callback_wq, &cb->cb_work); in nfsd4_queue_cb()
1024 static bool nfsd41_cb_get_slot(struct nfsd4_callback *cb, struct rpc_task *task) in nfsd41_cb_get_slot() argument
1026 struct nfs4_client *clp = cb->cb_clp; in nfsd41_cb_get_slot()
1028 if (!cb->cb_holds_slot && in nfsd41_cb_get_slot()
1038 cb->cb_holds_slot = true; in nfsd41_cb_get_slot()
1042 static void nfsd41_cb_release_slot(struct nfsd4_callback *cb) in nfsd41_cb_release_slot() argument
1044 struct nfs4_client *clp = cb->cb_clp; in nfsd41_cb_release_slot()
1046 if (cb->cb_holds_slot) { in nfsd41_cb_release_slot()
1047 cb->cb_holds_slot = false; in nfsd41_cb_release_slot()
1053 static void nfsd41_destroy_cb(struct nfsd4_callback *cb) in nfsd41_destroy_cb() argument
1055 struct nfs4_client *clp = cb->cb_clp; in nfsd41_destroy_cb()
1057 nfsd41_cb_release_slot(cb); in nfsd41_destroy_cb()
1058 if (cb->cb_ops && cb->cb_ops->release) in nfsd41_destroy_cb()
1059 cb->cb_ops->release(cb); in nfsd41_destroy_cb()
1069 struct nfsd4_callback *cb = calldata; in nfsd4_cb_prepare() local
1070 struct nfs4_client *clp = cb->cb_clp; in nfsd4_cb_prepare()
1077 cb->cb_seq_status = 1; in nfsd4_cb_prepare()
1078 cb->cb_status = 0; in nfsd4_cb_prepare()
1079 if (minorversion && !nfsd41_cb_get_slot(cb, task)) in nfsd4_cb_prepare()
1084 static bool nfsd4_cb_sequence_done(struct rpc_task *task, struct nfsd4_callback *cb) in nfsd4_cb_sequence_done() argument
1086 struct nfs4_client *clp = cb->cb_clp; in nfsd4_cb_sequence_done()
1106 if (!cb->cb_holds_slot) in nfsd4_cb_sequence_done()
1109 switch (cb->cb_seq_status) { in nfsd4_cb_sequence_done()
1125 nfsd4_mark_cb_fault(cb->cb_clp, cb->cb_seq_status); in nfsd4_cb_sequence_done()
1143 nfsd4_mark_cb_fault(cb->cb_clp, cb->cb_seq_status); in nfsd4_cb_sequence_done()
1145 cb->cb_seq_status); in nfsd4_cb_sequence_done()
1148 nfsd41_cb_release_slot(cb); in nfsd4_cb_sequence_done()
1163 cb->cb_need_restart = true; in nfsd4_cb_sequence_done()
1170 struct nfsd4_callback *cb = calldata; in nfsd4_cb_done() local
1171 struct nfs4_client *clp = cb->cb_clp; in nfsd4_cb_done()
1175 if (!nfsd4_cb_sequence_done(task, cb)) in nfsd4_cb_done()
1178 if (cb->cb_status) { in nfsd4_cb_done()
1180 task->tk_status = cb->cb_status; in nfsd4_cb_done()
1183 switch (cb->cb_ops->done(cb, task)) { in nfsd4_cb_done()
1203 struct nfsd4_callback *cb = calldata; in nfsd4_cb_release() local
1205 if (cb->cb_need_restart) in nfsd4_cb_release()
1206 nfsd4_queue_cb(cb); in nfsd4_cb_release()
1208 nfsd41_destroy_cb(cb); in nfsd4_cb_release()
1266 static void nfsd4_process_cb_update(struct nfsd4_callback *cb) in nfsd4_process_cb_update() argument
1269 struct nfs4_client *clp = cb->cb_clp; in nfsd4_process_cb_update()
1298 memcpy(&conn, &cb->cb_clp->cl_cb_conn, sizeof(struct nfs4_cb_conn)); in nfsd4_process_cb_update()
1319 struct nfsd4_callback *cb = in nfsd4_run_cb_work() local
1321 struct nfs4_client *clp = cb->cb_clp; in nfsd4_run_cb_work()
1325 trace_nfsd_cb_work(clp, cb->cb_msg.rpc_proc->p_name); in nfsd4_run_cb_work()
1327 if (cb->cb_need_restart) { in nfsd4_run_cb_work()
1328 cb->cb_need_restart = false; in nfsd4_run_cb_work()
1330 if (cb->cb_ops && cb->cb_ops->prepare) in nfsd4_run_cb_work()
1331 cb->cb_ops->prepare(cb); in nfsd4_run_cb_work()
1335 nfsd4_process_cb_update(cb); in nfsd4_run_cb_work()
1340 nfsd41_destroy_cb(cb); in nfsd4_run_cb_work()
1347 if (!cb->cb_ops && clp->cl_minorversion) { in nfsd4_run_cb_work()
1349 nfsd41_destroy_cb(cb); in nfsd4_run_cb_work()
1353 cb->cb_msg.rpc_cred = clp->cl_cb_cred; in nfsd4_run_cb_work()
1355 rpc_call_async(clnt, &cb->cb_msg, RPC_TASK_SOFT | flags, in nfsd4_run_cb_work()
1356 cb->cb_ops ? &nfsd4_cb_ops : &nfsd4_cb_probe_ops, cb); in nfsd4_run_cb_work()
1359 void nfsd4_init_cb(struct nfsd4_callback *cb, struct nfs4_client *clp, in nfsd4_init_cb() argument
1362 cb->cb_clp = clp; in nfsd4_init_cb()
1363 cb->cb_msg.rpc_proc = &nfs4_cb_procedures[op]; in nfsd4_init_cb()
1364 cb->cb_msg.rpc_argp = cb; in nfsd4_init_cb()
1365 cb->cb_msg.rpc_resp = cb; in nfsd4_init_cb()
1366 cb->cb_ops = ops; in nfsd4_init_cb()
1367 INIT_WORK(&cb->cb_work, nfsd4_run_cb_work); in nfsd4_init_cb()
1368 cb->cb_seq_status = 1; in nfsd4_init_cb()
1369 cb->cb_status = 0; in nfsd4_init_cb()
1370 cb->cb_need_restart = false; in nfsd4_init_cb()
1371 cb->cb_holds_slot = false; in nfsd4_init_cb()
1374 void nfsd4_run_cb(struct nfsd4_callback *cb) in nfsd4_run_cb() argument
1376 struct nfs4_client *clp = cb->cb_clp; in nfsd4_run_cb()
1379 if (!nfsd4_queue_cb(cb)) in nfsd4_run_cb()