|
Lines 3006-3012
tryagain:
Link Here
|
| 3006 |
/* |
3006 |
/* |
| 3007 |
* This is where we can choose to issue a delegation. |
3007 |
* This is where we can choose to issue a delegation. |
| 3008 |
*/ |
3008 |
*/ |
| 3009 |
if (delegate == 0 || writedeleg == 0 || |
3009 |
if ((new_stp->ls_flags & NFSLCK_WANTNODELEG) != 0) |
|
|
3010 |
*rflagsp |= NFSV4OPEN_WDNOTWANTED; |
| 3011 |
else if (nfsrv_issuedelegs == 0) |
| 3012 |
*rflagsp |= NFSV4OPEN_WDSUPPFTYPE; |
| 3013 |
else if (NFSRV_V4DELEGLIMIT(nfsrv_delegatecnt)) |
| 3014 |
*rflagsp |= NFSV4OPEN_WDRESOURCE; |
| 3015 |
else if (delegate == 0 || writedeleg == 0 || |
| 3010 |
NFSVNO_EXRDONLY(exp) || (readonly != 0 && |
3016 |
NFSVNO_EXRDONLY(exp) || (readonly != 0 && |
| 3011 |
nfsrv_writedelegifpos == 0) || |
3017 |
nfsrv_writedelegifpos == 0) || |
| 3012 |
!NFSVNO_DELEGOK(vp) || |
3018 |
!NFSVNO_DELEGOK(vp) || |
|
Lines 3014-3024
tryagain:
Link Here
|
| 3014 |
(clp->lc_flags & (LCL_CALLBACKSON | LCL_CBDOWN)) != |
3020 |
(clp->lc_flags & (LCL_CALLBACKSON | LCL_CBDOWN)) != |
| 3015 |
LCL_CALLBACKSON) |
3021 |
LCL_CALLBACKSON) |
| 3016 |
*rflagsp |= NFSV4OPEN_WDCONTENTION; |
3022 |
*rflagsp |= NFSV4OPEN_WDCONTENTION; |
| 3017 |
else if (nfsrv_issuedelegs == 0 || |
|
|
| 3018 |
NFSRV_V4DELEGLIMIT(nfsrv_delegatecnt)) |
| 3019 |
*rflagsp |= NFSV4OPEN_WDRESOURCE; |
| 3020 |
else if ((new_stp->ls_flags & NFSLCK_WANTNODELEG) != 0) |
| 3021 |
*rflagsp |= NFSV4OPEN_WDNOTWANTED; |
| 3022 |
else { |
3023 |
else { |
| 3023 |
new_deleg->ls_stateid.seqid = delegstateidp->seqid = 1; |
3024 |
new_deleg->ls_stateid.seqid = delegstateidp->seqid = 1; |
| 3024 |
new_deleg->ls_stateid.other[0] = delegstateidp->other[0] |
3025 |
new_deleg->ls_stateid.other[0] = delegstateidp->other[0] |
|
Lines 3068-3083
tryagain:
Link Here
|
| 3068 |
/* |
3069 |
/* |
| 3069 |
* This is where we can choose to issue a delegation. |
3070 |
* This is where we can choose to issue a delegation. |
| 3070 |
*/ |
3071 |
*/ |
| 3071 |
if (delegate == 0 || (writedeleg == 0 && readonly == 0) || |
3072 |
if ((new_stp->ls_flags & NFSLCK_WANTNODELEG) != 0) |
| 3072 |
!NFSVNO_DELEGOK(vp) || |
3073 |
*rflagsp |= NFSV4OPEN_WDNOTWANTED; |
|
|
3074 |
else if (nfsrv_issuedelegs == 0) |
| 3075 |
*rflagsp |= NFSV4OPEN_WDSUPPFTYPE; |
| 3076 |
else if (NFSRV_V4DELEGLIMIT(nfsrv_delegatecnt)) |
| 3077 |
*rflagsp |= NFSV4OPEN_WDRESOURCE; |
| 3078 |
else if (delegate == 0 || (writedeleg == 0 && |
| 3079 |
readonly == 0) || !NFSVNO_DELEGOK(vp) || |
| 3073 |
(clp->lc_flags & (LCL_CALLBACKSON | LCL_CBDOWN)) != |
3080 |
(clp->lc_flags & (LCL_CALLBACKSON | LCL_CBDOWN)) != |
| 3074 |
LCL_CALLBACKSON) |
3081 |
LCL_CALLBACKSON) |
| 3075 |
*rflagsp |= NFSV4OPEN_WDCONTENTION; |
3082 |
*rflagsp |= NFSV4OPEN_WDCONTENTION; |
| 3076 |
else if (nfsrv_issuedelegs == 0 || |
|
|
| 3077 |
NFSRV_V4DELEGLIMIT(nfsrv_delegatecnt)) |
| 3078 |
*rflagsp |= NFSV4OPEN_WDRESOURCE; |
| 3079 |
else if ((new_stp->ls_flags & NFSLCK_WANTNODELEG) != 0) |
| 3080 |
*rflagsp |= NFSV4OPEN_WDNOTWANTED; |
| 3081 |
else { |
3083 |
else { |
| 3082 |
new_deleg->ls_stateid.seqid = delegstateidp->seqid = 1; |
3084 |
new_deleg->ls_stateid.seqid = delegstateidp->seqid = 1; |
| 3083 |
new_deleg->ls_stateid.other[0] = delegstateidp->other[0] |
3085 |
new_deleg->ls_stateid.other[0] = delegstateidp->other[0] |