diff options
Diffstat (limited to 'sys/nfsclient/nfs_bio.c')
-rw-r--r-- | sys/nfsclient/nfs_bio.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c index 61e6d00..ce4b896 100644 --- a/sys/nfsclient/nfs_bio.c +++ b/sys/nfsclient/nfs_bio.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_bio.c 8.5 (Berkeley) 1/4/94 - * $Id: nfs_bio.c,v 1.24 1996/07/16 10:19:43 dfr Exp $ + * $Id: nfs_bio.c,v 1.25 1996/09/19 18:20:54 nate Exp $ */ #include <sys/param.h> @@ -46,6 +46,7 @@ #include <sys/vnode.h> #include <sys/mount.h> #include <sys/kernel.h> +#include <sys/sysctl.h> #include <vm/vm.h> #include <vm/vm_param.h> @@ -65,6 +66,9 @@ extern struct proc *nfs_iodwant[NFS_MAXASYNCDAEMON]; extern int nfs_numasync; extern struct nfsstats nfsstats; +int nfs_dwrite = 1; +SYSCTL_INT(_vfs_nfs, OID_AUTO, dwrite, CTLFLAG_RW, &nfs_dwrite, 0, ""); + /* * Ifdefs for FreeBSD-current's merged VM/buffer cache. It is unfortunate * that this isn't done inside getblk() and brelse() so these calls @@ -753,6 +757,14 @@ nfs_asyncio(bp, cred) return (EIO); /* + * Allow the administrator to override the choice of using a delayed + * write since it is a pessimization for some servers, notably some + * Solaris servers. + */ + if (!nfs_dwrite) + return (EIO); + + /* * Just turn the async write into a delayed write, instead of * doing in synchronously. Hopefully, at least one of the nfsiods * is currently doing a write for this file and will pick up the |