Lines Matching refs:lrp
283 nfs4_lost_rqst_t *lrp = recovp->rc_lost_rqst; in nfs4_enqueue_lost_rqst() local
288 ASSERT(lrp != NULL && lrp->lr_op != 0); in nfs4_enqueue_lost_rqst()
292 (void *)lrp, lrp->lr_op)); in nfs4_enqueue_lost_rqst()
296 if (lrp->lr_putfirst) in nfs4_enqueue_lost_rqst()
297 list_insert_head(&mi->mi_lost_state, lrp); in nfs4_enqueue_lost_rqst()
299 list_insert_tail(&mi->mi_lost_state, lrp); in nfs4_enqueue_lost_rqst()
303 nfs4_queue_event(RE_LOST_STATE, mi, NULL, lrp->lr_op, lrp->lr_vp, in nfs4_enqueue_lost_rqst()
304 lrp->lr_dvp, 0, NULL, 0, TAG_NONE, TAG_NONE, 0, 0); in nfs4_enqueue_lost_rqst()
1444 nfs4_lost_rqst_t *lrp; in nfs4_recov_thread() local
1469 while ((lrp = list_head(&local_lost_state)) != NULL) { in nfs4_recov_thread()
1470 list_remove(&local_lost_state, lrp); in nfs4_recov_thread()
1471 nfs4_free_lost_rqst(lrp, sp); in nfs4_recov_thread()
2391 nfs4_free_lost_rqst(nfs4_lost_rqst_t *lrp, nfs4_server_t *sp) in nfs4_free_lost_rqst() argument
2400 switch (lrp->lr_op) { in nfs4_free_lost_rqst()
2402 filep = &lrp->lr_ofile; in nfs4_free_lost_rqst()
2409 nfs4delegreturn_cleanup(VTOR4(lrp->lr_vp), sp); in nfs4_free_lost_rqst()
2412 osp = lrp->lr_osp; in nfs4_free_lost_rqst()
2419 nfs4close_notw(lrp->lr_vp, osp, &have_sync_lock); in nfs4_free_lost_rqst()
2426 lrp->lr_op = 0; in nfs4_free_lost_rqst()
2427 if (lrp->lr_oop != NULL) { in nfs4_free_lost_rqst()
2428 open_owner_rele(lrp->lr_oop); in nfs4_free_lost_rqst()
2429 lrp->lr_oop = NULL; in nfs4_free_lost_rqst()
2431 if (lrp->lr_osp != NULL) { in nfs4_free_lost_rqst()
2432 open_stream_rele(lrp->lr_osp, VTOR4(lrp->lr_vp)); in nfs4_free_lost_rqst()
2433 lrp->lr_osp = NULL; in nfs4_free_lost_rqst()
2435 if (lrp->lr_lop != NULL) { in nfs4_free_lost_rqst()
2436 lock_owner_rele(lrp->lr_lop); in nfs4_free_lost_rqst()
2437 lrp->lr_lop = NULL; in nfs4_free_lost_rqst()
2439 if (lrp->lr_flk != NULL) { in nfs4_free_lost_rqst()
2440 kmem_free(lrp->lr_flk, sizeof (flock64_t)); in nfs4_free_lost_rqst()
2441 lrp->lr_flk = NULL; in nfs4_free_lost_rqst()
2443 if (lrp->lr_vp != NULL) { in nfs4_free_lost_rqst()
2444 VN_RELE(lrp->lr_vp); in nfs4_free_lost_rqst()
2445 lrp->lr_vp = NULL; in nfs4_free_lost_rqst()
2447 if (lrp->lr_dvp != NULL) { in nfs4_free_lost_rqst()
2448 VN_RELE(lrp->lr_dvp); in nfs4_free_lost_rqst()
2449 lrp->lr_dvp = NULL; in nfs4_free_lost_rqst()
2451 if (lrp->lr_cr != NULL) { in nfs4_free_lost_rqst()
2452 crfree(lrp->lr_cr); in nfs4_free_lost_rqst()
2453 lrp->lr_cr = NULL; in nfs4_free_lost_rqst()
2456 kmem_free(lrp, sizeof (nfs4_lost_rqst_t)); in nfs4_free_lost_rqst()
2465 nfs4_lost_rqst_t *lrp; in nfs4_remove_lost_rqsts() local
2468 while ((lrp = list_head(&mi->mi_lost_state)) != NULL) { in nfs4_remove_lost_rqsts()
2469 list_remove(&mi->mi_lost_state, lrp); in nfs4_remove_lost_rqsts()
2471 nfs4_free_lost_rqst(lrp, sp); in nfs4_remove_lost_rqsts()
2643 nfs4_lost_rqst_t *lrp, *tlrp; in nfs4_resend_lost_rqsts() local
2656 lrp = list_head(&mi->mi_lost_state); in nfs4_resend_lost_rqsts()
2658 while (lrp != NULL) { in nfs4_resend_lost_rqsts()
2660 resend_one_op(lrp, &n4e, mi, sp); in nfs4_resend_lost_rqsts()
2663 "error %d stat %d", (void *)lrp->lr_vp, n4e.error, in nfs4_resend_lost_rqsts()
2692 mi, lrp->lr_dvp, lrp->lr_vp, NULL, NULL, in nfs4_resend_lost_rqsts()
2693 lrp->lr_op, NULL, NULL, NULL); in nfs4_resend_lost_rqsts()
2699 list_remove(&mi->mi_lost_state, lrp); in nfs4_resend_lost_rqsts()
2700 tlrp = lrp; in nfs4_resend_lost_rqsts()
2701 lrp = list_head(&mi->mi_lost_state); in nfs4_resend_lost_rqsts()
2713 resend_one_op(nfs4_lost_rqst_t *lrp, nfs4_error_t *ep, in resend_one_op() argument
2721 vp = lrp->lr_vp; in resend_one_op()
2725 switch (lrp->lr_op) { in resend_one_op()
2727 nfs4_resend_open_otw(&vp, lrp, ep); in resend_one_op()
2730 ASSERT(lrp->lr_oop != NULL); in resend_one_op()
2731 ep->error = nfs4_start_open_seqid_sync(lrp->lr_oop, mi); in resend_one_op()
2733 ASSERT(lrp->lr_osp != NULL); in resend_one_op()
2734 mutex_enter(&lrp->lr_osp->os_sync_lock); in resend_one_op()
2735 nfs4_open_downgrade(lrp->lr_dg_acc, lrp->lr_dg_deny, in resend_one_op()
2736 lrp->lr_oop, lrp->lr_osp, vp, lrp->lr_cr, lrp, in resend_one_op()
2738 mutex_exit(&lrp->lr_osp->os_sync_lock); in resend_one_op()
2739 nfs4_end_open_seqid_sync(lrp->lr_oop); in resend_one_op()
2742 osp = lrp->lr_osp; in resend_one_op()
2743 cr = lrp->lr_cr; in resend_one_op()
2751 nfs4close_one(vp, osp, cr, acc_bits, lrp, ep, in resend_one_op()
2756 resend_lock(lrp, ep); in resend_one_op()
2759 nfs4_resend_delegreturn(lrp, ep, sp); in resend_one_op()
2764 lrp->lr_op); in resend_one_op()
2767 lrp->lr_op, lrp->lr_vp, lrp->lr_dvp, NFS4_OK, NULL, 0, in resend_one_op()
2786 if (lrp->lr_op == OP_OPEN_DOWNGRADE || lrp->lr_op == OP_CLOSE) in resend_one_op()
2794 ASSERT(lrp->lr_op == OP_OPEN); in resend_one_op()
2802 close_after_open_resend(vp, lrp->lr_cr, lrp->lr_oacc, ep); in resend_one_op()
2808 if (vp != lrp->lr_vp) in resend_one_op()
2851 resend_lock(nfs4_lost_rqst_t *lrp, nfs4_error_t *ep) in resend_lock() argument
2854 vnode_t *vp = lrp->lr_vp; in resend_lock()
2857 ASSERT(lrp->lr_ctype == NFS4_LCK_CTYPE_REINSTATE || in resend_lock()
2858 lrp->lr_ctype == NFS4_LCK_CTYPE_RESEND); in resend_lock()
2860 nfs4frlock(lrp->lr_ctype, vp, F_SETLK, in resend_lock()
2861 lrp->lr_flk, FREAD|FWRITE, 0, lrp->lr_cr, ep, lrp, NULL); in resend_lock()
2870 lrp->lr_ctype == NFS4_LCK_CTYPE_RESEND) in resend_lock()
2896 lrp->lr_op == OP_LOCKU) in resend_lock()
2947 nfs4_send_siglost(lrp->lr_flk->l_pid, VTOMI4(vp), vp, FALSE, in resend_lock()
2956 if (lrp->lr_ctype == NFS4_LCK_CTYPE_REINSTATE) in resend_lock()
2957 flush_reinstate(lrp); in resend_lock()
2968 flush_reinstate(nfs4_lost_rqst_t *lrp) in flush_reinstate() argument
2975 vp = lrp->lr_vp; in flush_reinstate()
2977 pid = lrp->lr_flk->l_pid; in flush_reinstate()
2985 for (lrp = list_next(&mi->mi_lost_state, lrp); lrp != NULL; in flush_reinstate()
2986 lrp = nlrp) { in flush_reinstate()
2987 nlrp = list_next(&mi->mi_lost_state, lrp); in flush_reinstate()
2988 if (lrp->lr_op != OP_LOCK && lrp->lr_op != OP_LOCKU) in flush_reinstate()
2990 if (lrp->lr_ctype != NFS4_LCK_CTYPE_REINSTATE) in flush_reinstate()
2992 ASSERT(lrp->lr_vp == vp); in flush_reinstate()
2993 ASSERT(lrp->lr_flk->l_pid == pid); in flush_reinstate()
2995 "remove reinstantiation %p", (void *)lrp)); in flush_reinstate()
2996 list_remove(&mi->mi_lost_state, lrp); in flush_reinstate()
2997 nfs4_free_lost_rqst(lrp, NULL); in flush_reinstate()