* [PATCH] Do not cache NFSv2 readdir replies
@ 2005-02-07 13:15 Olaf Kirch
0 siblings, 0 replies; only message in thread
From: Olaf Kirch @ 2005-02-07 13:15 UTC (permalink / raw)
To: nfs
[-- Attachment #1: Type: text/plain, Size: 769 bytes --]
Hi,
we're currently caching NFSv2 readdir replies, even though the code uses
xdr pages to store the directories entries. As a result, we only cache
the NFS status and none of the entries, the cookie or the EOF flag.
Retransmitted NFSv2 readdir calls will see garbage replies.
(In case you're wondering why, I just had the pleasure of diagnosing a
rather interesting NFS problem with a POS system that used a homebrew
NFSv2 client that reused XIDs quite liberally and fell over when they
ran into this. Hard to believe, but there are NFS clients more bizarre
than zOS :-)
Please find attached the patch against 2.6.11-rc
Olaf
--
Olaf Kirch | --- o --- Nous sommes du soleil we love when we play
okir@suse.de | / | \ sol.dhoop.naytheet.ah kin.ir.samse.qurax
[-- Attachment #2: nfsd-no-cache-readdir --]
[-- Type: text/plain, Size: 959 bytes --]
From: Olaf Kirch <okir@suse.de>
Subject: Do not cache NFSv2 readdir replies
nfsd would put incomplete readdir replies in the reply cache,
so that incomplete replies are returned in response to retransmitted
READDIR calls.
Signed-off-by: okir@suse.de
Index: linux-2.6.5/fs/nfsd/nfsproc.c
===================================================================
--- linux-2.6.5.orig/fs/nfsd/nfsproc.c 2005-01-27 17:32:42.000000000 +0100
+++ linux-2.6.5/fs/nfsd/nfsproc.c 2005-02-07 13:41:36.000000000 +0100
@@ -539,7 +539,7 @@ static struct svc_procedure nfsd_proced
PROC(symlink, symlinkargs, void, none, RC_REPLSTAT, ST),
PROC(mkdir, createargs, diropres, fhandle, RC_REPLBUFF, ST+FH+AT),
PROC(rmdir, diropargs, void, none, RC_REPLSTAT, ST),
- PROC(readdir, readdirargs, readdirres, none, RC_REPLBUFF, 0),
+ PROC(readdir, readdirargs, readdirres, none, RC_NOCACHE, 0),
PROC(statfs, fhandle, statfsres, none, RC_NOCACHE, ST+5),
};
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-02-07 13:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-07 13:15 [PATCH] Do not cache NFSv2 readdir replies Olaf Kirch
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.