Re: 2.4.0-test1 knfsd

From: Neil Brown (neilb@cse.unsw.edu.au)
Date: Wed Jun 14 2000 - 21:53:58 EST


On Wednesday June 14, klaus.kudielka@ieee.org wrote:
> Hello,
>
> can somebody explain _why_ asynchronous writes are completely disabled for
> NFS v2 clients? If not, I suggest the following patch, which results in
> the documented behaviour (sync or async option in /etc/exports):

Golly, did I do that? I guess I must have done.

>
> --- nfsproc.c.ORIG Wed Jun 14 10:51:15 2000
> +++ nfsproc.c Wed Jun 14 10:51:36 2000
> @@ -167,7 +167,7 @@
> struct nfsd_attrstat *resp)
> {
> int nfserr;
> - int stable = 1;
> + int stable = 0;
>
> dprintk("nfsd: WRITE %s %d bytes at %d\n",
> SVCFH_fmt(&argp->fh),

I think this bit should stay as it is. The async/sync logic is all in
vfs.c
The CONFIG_NFSD_V3 branch looks right, and I cannot really see any
reason for keeping it separate so I would go for:

--- vfs.c 2000/06/15 02:48:41 1.1
+++ vfs.c 2000/06/15 02:51:42
@@ -666,14 +666,11 @@
                stable = 2;
                *stablep = 2; /* FILE_SYNC */
         }
+#endif /* CONFIG_NFSD_V3 */
         if (!EX_ISSYNC(exp))
                 stable = 0;
         if (stable && !EX_WGATHER(exp))
                 file.f_flags |= O_SYNC;
-#else
- if ((stable || (stable = EX_ISSYNC(exp))) && !EX_WGATHER(exp))
- file.f_flags |= O_SYNC;
-#endif /* CONFIG_NFSD_V3 */
 
         file.f_pos = offset; /* set write offset */
 

Does that work for you?

NeilBrown

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:33 EST