FreeBSD Bugzilla – Attachment 223814 Details for
Bug 254560
NFSv4.1 server broken when mounted by Linux using nconnects
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
make server retry CB_RECALL every couple of seconds
bind3.patch (text/plain), 3.08 KB, created by
Rick Macklem
on 2021-04-05 01:25:10 UTC
(
hide
)
Description:
make server retry CB_RECALL every couple of seconds
Filename:
MIME Type:
Creator:
Rick Macklem
Created:
2021-04-05 01:25:10 UTC
Size:
3.08 KB
patch
obsolete
>--- sys/fs/nfsserver/nfs_nfsdstate.c.bs2 2021-04-03 11:21:06.706663000 -0700 >+++ sys/fs/nfsserver/nfs_nfsdstate.c 2021-04-04 10:29:43.549018000 -0700 >@@ -3068,6 +3068,7 @@ tryagain: > new_deleg->ls_clp = clp; > new_deleg->ls_filerev = filerev; > new_deleg->ls_compref = nd->nd_compref; >+ new_deleg->ls_lastrecall = 0; > LIST_INSERT_HEAD(&lfp->lf_deleg, new_deleg, ls_file); > LIST_INSERT_HEAD(NFSSTATEHASH(clp, > new_deleg->ls_stateid), new_deleg, ls_hash); >@@ -3189,6 +3190,7 @@ tryagain: > new_deleg->ls_clp = clp; > new_deleg->ls_filerev = filerev; > new_deleg->ls_compref = nd->nd_compref; >+ new_deleg->ls_lastrecall = 0; > nfsrv_writedelegcnt++; > LIST_INSERT_HEAD(&lfp->lf_deleg, new_deleg, ls_file); > LIST_INSERT_HEAD(NFSSTATEHASH(clp, >@@ -3259,6 +3261,7 @@ tryagain: > new_deleg->ls_clp = clp; > new_deleg->ls_filerev = filerev; > new_deleg->ls_compref = nd->nd_compref; >+ new_deleg->ls_lastrecall = 0; > LIST_INSERT_HEAD(&lfp->lf_deleg, new_deleg, ls_file); > LIST_INSERT_HEAD(NFSSTATEHASH(clp, > new_deleg->ls_stateid), new_deleg, ls_hash); >@@ -3337,6 +3340,7 @@ tryagain: > new_deleg->ls_clp = clp; > new_deleg->ls_filerev = filerev; > new_deleg->ls_compref = nd->nd_compref; >+ new_deleg->ls_lastrecall = 0; > LIST_INSERT_HEAD(&lfp->lf_deleg, new_deleg, > ls_file); > LIST_INSERT_HEAD(NFSSTATEHASH(clp, >@@ -5263,7 +5267,8 @@ nfsrv_delegconflict(struct nfsstate *stp, int *haslock > * - check to see if the delegation has expired > * - if so, get the v4root lock and then expire it > */ >- if (!(stp->ls_flags & NFSLCK_DELEGRECALL)) { >+ if ((stp->ls_flags & NFSLCK_DELEGRECALL) == 0 || stp->ls_lastrecall < >+ time_uptime) { > /* > * - do a recall callback, since not yet done > * For now, never allow truncate to be set. To use >@@ -5278,11 +5283,14 @@ nfsrv_delegconflict(struct nfsstate *stp, int *haslock > * will be extended when ops are done on the delegation > * stateid, up to the timelimit.) > */ >- stp->ls_delegtime = NFSD_MONOSEC + (2 * nfsrv_lease) + >- NFSRV_LEASEDELTA; >- stp->ls_delegtimelimit = NFSD_MONOSEC + (6 * nfsrv_lease) + >- NFSRV_LEASEDELTA; >- stp->ls_flags |= NFSLCK_DELEGRECALL; >+ if ((stp->ls_flags & NFSLCK_DELEGRECALL) == 0) { >+ stp->ls_delegtime = NFSD_MONOSEC + (2 * nfsrv_lease) + >+ NFSRV_LEASEDELTA; >+ stp->ls_delegtimelimit = NFSD_MONOSEC + (6 * >+ nfsrv_lease) + NFSRV_LEASEDELTA; >+ stp->ls_flags |= NFSLCK_DELEGRECALL; >+ } >+ stp->ls_lastrecall = time_uptime + 1; > > /* > * Loop NFSRV_CBRETRYCNT times while the CBRecall replies >--- sys/fs/nfs/nfsrvstate.h.bs2 2021-04-03 11:15:49.596748000 -0700 >+++ sys/fs/nfs/nfsrvstate.h 2021-04-03 11:34:32.299859000 -0700 >@@ -220,6 +220,7 @@ struct nfsstate { > time_t expiry; > time_t limit; > u_int64_t compref; >+ time_t last; > } deleg; > } ls_un; > struct nfslockfile *ls_lfp; /* Back pointer */ >@@ -238,6 +239,7 @@ struct nfsstate { > #define ls_delegtime ls_un.deleg.expiry > #define ls_delegtimelimit ls_un.deleg.limit > #define ls_compref ls_un.deleg.compref >+#define ls_lastrecall ls_un.deleg.last > > /* > * Nfs lock structure.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 254560
:
223584
|
223813
| 223814