From: Olaf Kirch <okir@suse.de>
To: nfs@lists.sourceforge.net
Subject: [PATCH] Do not cache NFSv2 readdir replies
Date: Mon, 7 Feb 2005 14:15:47 +0100 [thread overview]
Message-ID: <20050207131547.GE5275@suse.de> (raw)
[-- 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),
};
reply other threads:[~2005-02-07 13:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050207131547.GE5275@suse.de \
--to=okir@suse.de \
--cc=nfs@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.