Do not cache NFSv2 readdir replies
Subsystems (2)
PATCH 1/1 Do not cache NFSv2 readdir replies
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
Signature · 2 lines
Olaf Kirch | --- o --- Nous sommes du soleil we love when we play [email protected] | / | \ sol.dhoop.naytheet.ah kin.ir.samse.qurax
From: Olaf Kirch <[email protected]>
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.
fs/nfsd/nfsproc.c +1 -1
@@ -539,7 +539,7 @@ static struct svc_procedure nfsd_procedPROC (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), };