Lines Matching refs:msg
351 nfs_lockd_send_request(LOCKD_MSG *msg, int interruptable)
366 msg->lm_version,
367 msg->lm_flags,
368 msg->lm_xid,
369 msg->lm_fl.l_start,
370 msg->lm_fl.l_len,
371 msg->lm_fl.l_pid,
372 msg->lm_fl.l_type,
373 msg->lm_fl.l_whence,
374 (uint32_t *)&msg->lm_addr,
375 (uint32_t *)&msg->lm_cred,
376 msg->lm_fh_len,
377 msg->lm_fh);
410 LOCKD_MSG *msg = &msgreq->lmr_msg;
425 bcopy(saddr, &msg->lm_addr, min(sizeof msg->lm_addr, saddr->sa_len));
427 msg->lm_flags |= LOCKD_MSG_NFSV3;
430 msg->lm_flags |= LOCKD_MSG_TCP;
441 msg->lm_xid = nfs_lockxid_get();
451 error = nfs_lockd_send_request(msg, interruptable);
580 !(msg->lm_flags & LOCKD_MSG_CANCEL)) {
582 msg->lm_flags |= LOCKD_MSG_CANCEL;
584 msg->lm_xid = nfs_lockxid_get();
600 !(msg->lm_flags & LOCKD_MSG_DENIED_GRACE) &&
622 msg->lm_flags |= LOCKD_MSG_CANCEL;
624 msg->lm_xid = nfs_lockxid_get();
650 if (msgreq->lmr_answered && (msg->lm_flags & LOCKD_MSG_DENIED_GRACE)) {
668 if ((msg->lm_flags & LOCKD_MSG_CANCEL) &&
676 msg->lm_flags &= ~LOCKD_MSG_CANCEL;
687 if (msg->lm_flags & LOCKD_MSG_CANCEL) {
688 msg->lm_flags &= ~LOCKD_MSG_CANCEL;
751 LOCKD_MSG *msg;
766 msg = &msgreq.lmr_msg;
767 msg->lm_version = LOCKD_MSG_VERSION;
769 msg->lm_flags |= LOCKD_MSG_BLOCK;
771 msg->lm_flags |= LOCKD_MSG_RECLAIM;
772 msg->lm_fh_len = (nmp->nm_vers == NFS_VER2) ? NFSX_V2FH : np->n_fhsize;
773 bcopy(np->n_fhp, msg->lm_fh, msg->lm_fh_len);
774 cru2x(cred, &msg->lm_cred);
776 msg->lm_fl.l_whence = SEEK_SET;
777 msg->lm_fl.l_start = nflp->nfl_start;
778 msg->lm_fl.l_len = NFS_FLOCK_LENGTH(nflp->nfl_start, nflp->nfl_end);
779 msg->lm_fl.l_type = nflp->nfl_type;
780 msg->lm_fl.l_pid = nlop->nlo_pid;
804 LOCKD_MSG *msg;
812 msg = &msgreq.lmr_msg;
813 msg->lm_version = LOCKD_MSG_VERSION;
814 msg->lm_fh_len = (nmp->nm_vers == NFS_VER2) ? NFSX_V2FH : np->n_fhsize;
815 bcopy(np->n_fhp, msg->lm_fh, msg->lm_fh_len);
816 cru2x(cred, &msg->lm_cred);
818 msg->lm_fl.l_whence = SEEK_SET;
819 msg->lm_fl.l_start = start;
820 msg->lm_fl.l_len = NFS_FLOCK_LENGTH(start, end);
821 msg->lm_fl.l_type = F_UNLCK;
822 msg->lm_fl.l_pid = nlop->nlo_pid;
842 LOCKD_MSG *msg;
850 msg = &msgreq.lmr_msg;
851 msg->lm_version = LOCKD_MSG_VERSION;
852 msg->lm_flags |= LOCKD_MSG_TEST;
853 msg->lm_fh_len = (nmp->nm_vers == NFS_VER2) ? NFSX_V2FH : np->n_fhsize;
854 bcopy(np->n_fhp, msg->lm_fh, msg->lm_fh_len);
855 cru2x(vfs_context_ucred(ctx), &msg->lm_cred);
857 msg->lm_fl.l_whence = SEEK_SET;
858 msg->lm_fl.l_start = start;
859 msg->lm_fl.l_len = NFS_FLOCK_LENGTH(start, end);
860 msg->lm_fl.l_type = fl->l_type;
861 msg->lm_fl.l_pid = nlop->nlo_pid;
865 if (!error && (msg->lm_flags & LOCKD_MSG_TEST) && !msgreq.lmr_errno) {
866 if (msg->lm_fl.l_type != F_UNLCK) {
867 fl->l_type = msg->lm_fl.l_type;
868 fl->l_pid = msg->lm_fl.l_pid;
869 fl->l_start = msg->lm_fl.l_start;
870 fl->l_len = msg->lm_fl.l_len;