Lines 3068-3073
tryagain:
Link Here
|
3068 |
new_deleg->ls_clp = clp; |
3068 |
new_deleg->ls_clp = clp; |
3069 |
new_deleg->ls_filerev = filerev; |
3069 |
new_deleg->ls_filerev = filerev; |
3070 |
new_deleg->ls_compref = nd->nd_compref; |
3070 |
new_deleg->ls_compref = nd->nd_compref; |
|
|
3071 |
new_deleg->ls_lastrecall = 0; |
3071 |
LIST_INSERT_HEAD(&lfp->lf_deleg, new_deleg, ls_file); |
3072 |
LIST_INSERT_HEAD(&lfp->lf_deleg, new_deleg, ls_file); |
3072 |
LIST_INSERT_HEAD(NFSSTATEHASH(clp, |
3073 |
LIST_INSERT_HEAD(NFSSTATEHASH(clp, |
3073 |
new_deleg->ls_stateid), new_deleg, ls_hash); |
3074 |
new_deleg->ls_stateid), new_deleg, ls_hash); |
Lines 3189-3194
tryagain:
Link Here
|
3189 |
new_deleg->ls_clp = clp; |
3190 |
new_deleg->ls_clp = clp; |
3190 |
new_deleg->ls_filerev = filerev; |
3191 |
new_deleg->ls_filerev = filerev; |
3191 |
new_deleg->ls_compref = nd->nd_compref; |
3192 |
new_deleg->ls_compref = nd->nd_compref; |
|
|
3193 |
new_deleg->ls_lastrecall = 0; |
3192 |
nfsrv_writedelegcnt++; |
3194 |
nfsrv_writedelegcnt++; |
3193 |
LIST_INSERT_HEAD(&lfp->lf_deleg, new_deleg, ls_file); |
3195 |
LIST_INSERT_HEAD(&lfp->lf_deleg, new_deleg, ls_file); |
3194 |
LIST_INSERT_HEAD(NFSSTATEHASH(clp, |
3196 |
LIST_INSERT_HEAD(NFSSTATEHASH(clp, |
Lines 3259-3264
tryagain:
Link Here
|
3259 |
new_deleg->ls_clp = clp; |
3261 |
new_deleg->ls_clp = clp; |
3260 |
new_deleg->ls_filerev = filerev; |
3262 |
new_deleg->ls_filerev = filerev; |
3261 |
new_deleg->ls_compref = nd->nd_compref; |
3263 |
new_deleg->ls_compref = nd->nd_compref; |
|
|
3264 |
new_deleg->ls_lastrecall = 0; |
3262 |
LIST_INSERT_HEAD(&lfp->lf_deleg, new_deleg, ls_file); |
3265 |
LIST_INSERT_HEAD(&lfp->lf_deleg, new_deleg, ls_file); |
3263 |
LIST_INSERT_HEAD(NFSSTATEHASH(clp, |
3266 |
LIST_INSERT_HEAD(NFSSTATEHASH(clp, |
3264 |
new_deleg->ls_stateid), new_deleg, ls_hash); |
3267 |
new_deleg->ls_stateid), new_deleg, ls_hash); |
Lines 3337-3342
tryagain:
Link Here
|
3337 |
new_deleg->ls_clp = clp; |
3340 |
new_deleg->ls_clp = clp; |
3338 |
new_deleg->ls_filerev = filerev; |
3341 |
new_deleg->ls_filerev = filerev; |
3339 |
new_deleg->ls_compref = nd->nd_compref; |
3342 |
new_deleg->ls_compref = nd->nd_compref; |
|
|
3343 |
new_deleg->ls_lastrecall = 0; |
3340 |
LIST_INSERT_HEAD(&lfp->lf_deleg, new_deleg, |
3344 |
LIST_INSERT_HEAD(&lfp->lf_deleg, new_deleg, |
3341 |
ls_file); |
3345 |
ls_file); |
3342 |
LIST_INSERT_HEAD(NFSSTATEHASH(clp, |
3346 |
LIST_INSERT_HEAD(NFSSTATEHASH(clp, |
Lines 5263-5269
nfsrv_delegconflict(struct nfsstate *stp, int *haslock
Link Here
|
5263 |
* - check to see if the delegation has expired |
5267 |
* - check to see if the delegation has expired |
5264 |
* - if so, get the v4root lock and then expire it |
5268 |
* - if so, get the v4root lock and then expire it |
5265 |
*/ |
5269 |
*/ |
5266 |
if (!(stp->ls_flags & NFSLCK_DELEGRECALL)) { |
5270 |
if ((stp->ls_flags & NFSLCK_DELEGRECALL) == 0 || stp->ls_lastrecall < |
|
|
5271 |
time_uptime) { |
5267 |
/* |
5272 |
/* |
5268 |
* - do a recall callback, since not yet done |
5273 |
* - do a recall callback, since not yet done |
5269 |
* For now, never allow truncate to be set. To use |
5274 |
* For now, never allow truncate to be set. To use |
Lines 5278-5288
nfsrv_delegconflict(struct nfsstate *stp, int *haslock
Link Here
|
5278 |
* will be extended when ops are done on the delegation |
5283 |
* will be extended when ops are done on the delegation |
5279 |
* stateid, up to the timelimit.) |
5284 |
* stateid, up to the timelimit.) |
5280 |
*/ |
5285 |
*/ |
5281 |
stp->ls_delegtime = NFSD_MONOSEC + (2 * nfsrv_lease) + |
5286 |
if ((stp->ls_flags & NFSLCK_DELEGRECALL) == 0) { |
5282 |
NFSRV_LEASEDELTA; |
5287 |
stp->ls_delegtime = NFSD_MONOSEC + (2 * nfsrv_lease) + |
5283 |
stp->ls_delegtimelimit = NFSD_MONOSEC + (6 * nfsrv_lease) + |
5288 |
NFSRV_LEASEDELTA; |
5284 |
NFSRV_LEASEDELTA; |
5289 |
stp->ls_delegtimelimit = NFSD_MONOSEC + (6 * |
5285 |
stp->ls_flags |= NFSLCK_DELEGRECALL; |
5290 |
nfsrv_lease) + NFSRV_LEASEDELTA; |
|
|
5291 |
stp->ls_flags |= NFSLCK_DELEGRECALL; |
5292 |
} |
5293 |
stp->ls_lastrecall = time_uptime + 1; |
5286 |
|
5294 |
|
5287 |
/* |
5295 |
/* |
5288 |
* Loop NFSRV_CBRETRYCNT times while the CBRecall replies |
5296 |
* Loop NFSRV_CBRETRYCNT times while the CBRecall replies |