Home | History | Annotate | Download | only in server

Lines Matching defs:new_stp

110 static void nfsrv_getowner(struct nfsstatehead *hp, struct nfsstate *new_stp,
1494 nfsrv_getowner(struct nfsstatehead *hp, struct nfsstate *new_stp,
1501 if (new_stp->ls_ownerlen == stp->ls_ownerlen &&
1502 !NFSBCMP(new_stp->ls_owner,stp->ls_owner,stp->ls_ownerlen)) {
1513 * The structures new_stp and new_lop are passed in as pointers that should
1528 struct nfsstate *new_stp = *new_stpp;
1543 if (new_stp->ls_flags & (NFSLCK_CHECK | NFSLCK_SETATTR)) {
1548 if (new_stp->ls_stateid.seqid == 0x0 &&
1549 new_stp->ls_stateid.other[0] == 0x0 &&
1550 new_stp->ls_stateid.other[1] == 0x0 &&
1551 new_stp->ls_stateid.other[2] == 0x0)
1553 else if (new_stp->ls_stateid.seqid == 0xffffffff &&
1554 new_stp->ls_stateid.other[0] == 0xffffffff &&
1555 new_stp->ls_stateid.other[1] == 0xffffffff &&
1556 new_stp->ls_stateid.other[2] == 0xffffffff)
1563 error = nfsrv_checkrestart(clientid, new_stp->ls_flags,
1564 &new_stp->ls_stateid, specialid);
1571 if ((new_stp->ls_flags & NFSLCK_LOCK) &&
1584 if (new_stp->ls_flags & NFSLCK_LOCK)
1601 getlckret = nfsrv_getlockfh(vp, new_stp->ls_flags, NULL, &nfh, p);
1604 if ((new_stp->ls_flags & (NFSLCK_LOCK | NFSLCK_UNLOCK)) != 0 &&
1606 getlckret = nfsrv_getlockfile(new_stp->ls_flags, NULL,
1611 getlckret = nfsrv_getlockfile(new_stp->ls_flags, NULL,
1619 if ((new_stp->ls_flags & NFSLCK_LOCK)) {
1641 if (new_stp->ls_flags & NFSLCK_TEST) {
1658 lckstp = new_stp;
1666 error = nfsrv_getstate(clp, &new_stp->ls_stateid,
1667 new_stp->ls_flags, &stp);
1679 if ((new_stp->ls_flags &
1709 if (new_stp->ls_flags & NFSLCK_OPENTOLOCK) {
1715 error = nfsrv_checkseqid(nd, new_stp->ls_seq,
1716 stp->ls_openowner, new_stp->ls_op);
1721 nfsrv_getowner(&stp->ls_open, new_stp, &lckstp);
1730 lckstp = new_stp;
1731 } else if (new_stp->ls_flags&(NFSLCK_LOCK|NFSLCK_UNLOCK)) {
1739 error = nfsrv_checkseqid(nd, new_stp->ls_seq,
1740 stp, new_stp->ls_op);
1757 if (!error && stp->ls_stateid.seqid!=new_stp->ls_stateid.seqid &&
1759 (!(new_stp->ls_flags & NFSLCK_CHECK) ||
1762 new_stp->ls_stateid.seqid != 0)))
1771 error = nfsrv_checkgrace(nd, clp, new_stp->ls_flags);
1772 if ((new_stp->ls_flags & NFSLCK_RECLAIM) && !error &&
1778 if ((new_stp->ls_flags & NFSLCK_RECLAIM) && !error)
1824 if (new_stp->ls_flags & NFSLCK_TEST) {
1826 } else if (new_stp->ls_flags &
1850 if (new_stp->ls_flags & (NFSLCK_CHECK | NFSLCK_LOCK)) {
1872 if (((new_stp->ls_flags & NFSLCK_LOCK) &&
1875 ((new_stp->ls_flags & (NFSLCK_CHECK|NFSLCK_READACCESS)) ==
1878 ((new_stp->ls_flags & (NFSLCK_CHECK|NFSLCK_WRITEACCESS)) ==
1900 if ((new_stp->ls_flags & NFSLCK_CHECK) && !delegation) {
1908 if (new_stp->ls_flags & bits & NFSLCK_ACCESSBITS) {
1941 if (new_stp->ls_flags & NFSLCK_SETATTR) {
1957 if (!(new_stp->ls_flags & NFSLCK_CHECK) ||
1985 if ((((new_stp->ls_flags&(NFSLCK_LOCK|NFSLCK_UNLOCK|NFSLCK_TEST))||
1986 ((new_stp->ls_flags & NFSLCK_CHECK) &&
1990 ((new_stp->ls_flags & NFSLCK_CHECK) &&
2040 if (new_stp->ls_flags & NFSLCK_UNLOCK) {
2134 else if (new_stp->ls_flags & NFSLCK_RECLAIM)
2136 else if (new_stp->ls_flags & NFSLCK_CHECK)
2162 if (new_stp->ls_flags & (NFSLCK_TEST | NFSLCK_CHECK)) {
2176 if (!(new_stp->ls_flags & NFSLCK_OPENTOLOCK)) {
2189 new_stp->ls_seq = new_stp->ls_opentolockseq;
2190 nfsrvd_refcache(new_stp->ls_op);
2191 stateidp->seqid = new_stp->ls_stateid.seqid = 1;
2192 stateidp->other[0] = new_stp->ls_stateid.other[0] =
2194 stateidp->other[1] = new_stp->ls_stateid.other[1] =
2196 stateidp->other[2] = new_stp->ls_stateid.other[2] =
2198 new_stp->ls_clp = clp;
2199 LIST_INIT(&new_stp->ls_lock);
2200 new_stp->ls_openstp = stp;
2201 new_stp->ls_lfp = lfp;
2202 nfsrv_insertlock(new_lop, (struct nfslock *)new_stp, new_stp,
2204 LIST_INSERT_HEAD(NFSSTATEHASH(clp, new_stp->ls_stateid),
2205 new_stp, ls_hash);
2206 LIST_INSERT_HEAD(&stp->ls_open, new_stp, ls_list);
2244 struct nfsstate *new_stp, vnode_t vp, struct nfsrv_descript *nd,
2253 if ((new_stp->ls_flags & NFSLCK_SHAREBITS) == NFSLCK_READACCESS)
2258 error = nfsrv_checkrestart(clientid, new_stp->ls_flags,
2259 &new_stp->ls_stateid, 0);
2279 getfhret = nfsrv_getlockfh(vp, new_stp->ls_flags, new_lfp,
2293 nfsrv_getowner(&clp->lc_open, new_stp, &ownerstp);
2296 error = nfsrv_checkseqid(nd, new_stp->ls_seq, ownerstp,
2297 new_stp->ls_op);
2312 error = nfsrv_checkgrace(nd, clp, new_stp->ls_flags);
2313 if ((new_stp->ls_flags & NFSLCK_RECLAIM) && !error &&
2350 error = nfsrv_getlockfile(new_stp->ls_flags, &new_lfp, &lfp,
2367 if (new_stp->ls_flags & NFSLCK_DELEGCUR) {
2386 ((new_stp->ls_flags & NFSLCK_WRITEACCESS) &&
2404 if (!(new_stp->ls_flags & NFSLCK_DELEGCUR) &&
2405 (((new_stp->ls_flags & NFSLCK_ACCESSBITS) &
2408 ((new_stp->ls_flags>>NFSLCK_SHIFT)&NFSLCK_ACCESSBITS)))){
2419 else if (new_stp->ls_flags & NFSLCK_RECLAIM)
2454 if (!(new_stp->ls_flags &
2499 struct nfsstate *new_stp = *new_stpp;
2507 if ((new_stp->ls_flags & NFSLCK_SHAREBITS) == NFSLCK_READACCESS)
2515 error = nfsrv_checkrestart(clientid, new_stp->ls_flags,
2516 &new_stp->ls_stateid, 0);
2531 getfhret = nfsrv_getlockfh(vp, new_stp->ls_flags, new_lfp,
2578 nfsrv_getowner(&clp->lc_open, new_stp, &ownerstp);
2596 if (new_stp->ls_flags & NFSLCK_RECLAIM)
2605 error = nfsrv_getlockfile(new_stp->ls_flags, &new_lfp, &lfp,
2626 if (new_stp->ls_flags & NFSLCK_DELEGCUR) {
2645 ((new_stp->ls_flags & NFSLCK_WRITEACCESS) &&
2678 if (!(new_stp->ls_flags & NFSLCK_DELEGCUR)) {
2691 if(((new_stp->ls_flags & NFSLCK_ACCESSBITS) &
2694 ((new_stp->ls_flags>>NFSLCK_SHIFT)&NFSLCK_ACCESSBITS))){
2708 else if (new_stp->ls_flags & NFSLCK_RECLAIM)
2745 if (!(new_stp->ls_flags & (NFSLCK_DELEGPREV | NFSLCK_DELEGCUR))) {
2757 if (new_stp->ls_flags & NFSLCK_RECLAIM) {
2789 if (new_stp->ls_flags & NFSLCK_DELEGPREV) {
2829 new_open->ls_flags = (new_stp->ls_flags&NFSLCK_DENYBITS)|
2836 new_open->ls_uid = new_stp->ls_uid;
2850 new_open->ls_openowner = new_stp;
2851 new_stp->ls_flags = 0;
2852 nfsrvd_refcache(new_stp->ls_op);
2853 new_stp->ls_noopens = 0;
2854 LIST_INIT(&new_stp->ls_open);
2855 LIST_INSERT_HEAD(&new_stp->ls_open, new_open, ls_list);
2856 LIST_INSERT_HEAD(&clp->lc_open, new_stp, ls_list);
2870 } else if (new_stp->ls_flags & (NFSLCK_DELEGREAD | NFSLCK_DELEGWRITE)) {
2897 if (new_stp->ls_flags & NFSLCK_DELEGWRITE) {
2906 new_deleg->ls_uid = new_stp->ls_uid;
2933 new_open->ls_flags = (new_stp->ls_flags & NFSLCK_DENYBITS) |
2935 if (new_stp->ls_flags & NFSLCK_DELEGWRITE)
2940 new_open->ls_uid = new_stp->ls_uid;
2954 new_open->ls_openowner = new_stp;
2955 new_stp->ls_flags = 0;
2956 nfsrvd_refcache(new_stp->ls_op);
2957 new_stp->ls_noopens = 0;
2958 LIST_INIT(&new_stp->ls_open);
2959 LIST_INSERT_HEAD(&new_stp->ls_open, new_open, ls_list);
2960 LIST_INSERT_HEAD(&clp->lc_open, new_stp, ls_list);
2977 ownerstp->ls_op = new_stp->ls_op;
2979 ownerstp->ls_seq = new_stp->ls_seq;
2982 stp->ls_flags = (new_stp->ls_flags & NFSLCK_SHAREBITS) |
2985 stp->ls_uid = new_stp->ls_uid;
2993 openstp->ls_flags |= (new_stp->ls_flags & NFSLCK_SHAREBITS);
3006 (new_stp->ls_flags & NFSLCK_WANTRDELEG) != 0 ||
3013 else if ((new_stp->ls_flags & NFSLCK_WANTNODELEG) != 0)
3026 new_deleg->ls_uid = new_stp->ls_uid;
3045 new_open->ls_flags = (new_stp->ls_flags & NFSLCK_SHAREBITS)|
3047 new_open->ls_uid = new_stp->ls_uid;
3072 else if ((new_stp->ls_flags & NFSLCK_WANTNODELEG) != 0)
3084 (new_stp->ls_flags & NFSLCK_WANTRDELEG) == 0) {
3093 new_deleg->ls_uid = new_stp->ls_uid;
3118 new_open->ls_flags = (new_stp->ls_flags & NFSLCK_SHAREBITS) |
3120 new_open->ls_uid = new_stp->ls_uid;
3122 new_open->ls_openowner = new_stp;
3126 if (new_stp->ls_flags & NFSLCK_RECLAIM) {
3127 new_stp->ls_flags = 0;
3130 new_stp->ls_flags = 0;
3142 (new_stp->ls_flags & NFSLCK_WANTNODELEG) == 0)) {
3157 (new_stp->ls_flags & NFSLCK_WANTRDELEG) ==
3170 new_deleg->ls_uid = new_stp->ls_uid;
3188 new_stp->ls_flags = NFSLCK_NEEDSCONFIRM;
3190 nfsrvd_refcache(new_stp->ls_op);
3191 new_stp->ls_noopens = 0;
3192 LIST_INIT(&new_stp->ls_open);
3193 LIST_INSERT_HEAD(&new_stp->ls_open, new_open, ls_list);
3194 LIST_INSERT_HEAD(&clp->lc_open, new_stp, ls_list);
3231 nfsrv_openupdate(vnode_t vp, struct nfsstate *new_stp, nfsquad_t clientid,
3244 error = nfsrv_checkrestart(clientid, new_stp->ls_flags,
3245 &new_stp->ls_stateid, 0);
3256 error = nfsrv_getstate(clp, &new_stp->ls_stateid,
3257 new_stp->ls_flags, &stp);
3263 (!(new_stp->ls_flags & NFSLCK_CONFIRM) &&
3265 ((new_stp->ls_flags & NFSLCK_CONFIRM) &&
3270 error = nfsrv_checkseqid(nd, new_stp->ls_seq,
3271 stp->ls_openowner, new_stp->ls_op);
3272 if (!error && stp->ls_stateid.seqid != new_stp->ls_stateid.seqid &&
3274 !(new_stp->ls_flags & NFSLCK_CONFIRM)) ||
3276 new_stp->ls_stateid.seqid != 0)))
3293 (new_stp->ls_flags & NFSLCK_CONFIRM) &&
3312 if (new_stp->ls_flags & NFSLCK_CONFIRM) {
3331 } else if (new_stp->ls_flags & NFSLCK_CLOSE) {
3355 bits = (new_stp->ls_flags & NFSLCK_SHAREBITS);
3470 nfsrv_releaselckown(struct nfsstate *new_stp, nfsquad_t clientid,
3480 error = nfsrv_checkrestart(clientid, new_stp->ls_flags,
3481 &new_stp->ls_stateid, 0);
3504 if (stp->ls_ownerlen == new_stp->ls_ownerlen &&
3505 !NFSBCMP(stp->ls_owner, new_stp->ls_owner,