diff options
author | David Malone <dwmalone@FreeBSD.org> | 2000-10-24 10:13:36 +0000 |
---|---|---|
committer | David Malone <dwmalone@FreeBSD.org> | 2000-10-24 10:13:36 +0000 |
commit | dc6dd1259fab7904e8ab42c4ff39468c945bfe4a (patch) | |
tree | 7d8b2dbbaea6837ac5dd52a5cd15aaa12180b107 /sys/nfsserver/nfsm_subs.h | |
parent | cf040f7474177407085756b798b568b5ca13dac1 (diff) | |
download | src-dc6dd1259fab7904e8ab42c4ff39468c945bfe4a.tar.gz src-dc6dd1259fab7904e8ab42c4ff39468c945bfe4a.zip |
Problem to avoid processes getting stuck in "vmopar". From Ian's
mail:
The problem seems to originate with NFS's postop_attr
information that is returned with a read or write RPC.
Within a vm_fault context, the code cannot deal with
vnode_pager_setsize() shrinking a vnode.
The workaround in the patch below stops the nfsm_postop_attr()
macro from ever shrinking a vnode. If the new size in the
postop_attr information is smaller, then it just sets the
nfsnode n_attrstamp to 0 to stop the wrong size getting
used in the future. This change only affects postop_attr
attributes; the nfsm_loadattr() macro works as normal.
The change is implemented by adding a new argument to
nfs_loadattrcache() called 'dontshrink'. When this is
non-zero, nfs_loadattrcache() will never reduce the
vnode/nfsnode size; instead it zeros n_attrstamp.
There remain other was processes can get stuck in vmopar.
Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
Reviewed by: dillon
Tested by: Vadim Belman <voland@lflat.org>
Notes
Notes:
svn path=/head/; revision=67486
Diffstat (limited to 'sys/nfsserver/nfsm_subs.h')
-rw-r--r-- | sys/nfsserver/nfsm_subs.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/nfsserver/nfsm_subs.h b/sys/nfsserver/nfsm_subs.h index b13c0099b816..0990fe4e0121 100644 --- a/sys/nfsserver/nfsm_subs.h +++ b/sys/nfsserver/nfsm_subs.h @@ -212,7 +212,7 @@ struct mbuf *nfsm_rpchead __P((struct ucred *cr, int nmflag, int procid, #define nfsm_loadattr(v, a) \ do { \ struct vnode *ttvp = (v); \ - if ((t1 = nfs_loadattrcache(&ttvp, &md, &dpos, (a))) != 0) { \ + if ((t1 = nfs_loadattrcache(&ttvp, &md, &dpos, (a), 0)) != 0) { \ error = t1; \ m_freem(mrep); \ goto nfsmout; \ @@ -226,7 +226,7 @@ struct mbuf *nfsm_rpchead __P((struct ucred *cr, int nmflag, int procid, nfsm_dissect(tl, u_int32_t *, NFSX_UNSIGNED); \ if (((f) = fxdr_unsigned(int, *tl)) != 0) { \ if ((t1 = nfs_loadattrcache(&ttvp, &md, &dpos, \ - (struct vattr *)0)) != 0) { \ + (struct vattr *)0, 1)) != 0) { \ error = t1; \ (f) = 0; \ m_freem(mrep); \ |