Hello,
I found a trivial problem that kernel might warn "RPC request reserved
1144 but used 1936" when NFS-readlink is requested.
This case will happen when symbolic-link file is very big
as nfsd_procedure3[] table assumes max-size of symbolic-link file is
256 bytes.
It should be change to NFS3_MAXPATHLEN.
Here is a patch against linux-2.5.35.
And we should also fix it on linux-2.4.19.
Thank you,
Hirokazu Takahashi.
--- linux.ORG/fs/nfsd/nfsproc.c Mon Sep 16 11:18:25 2002
+++ linux/fs/nfsd/nfsproc.c Tue Sep 17 16:07:04 2030
@@ -545,7 +545,7 @@ struct svc_procedure nfsd_procedures2[1
PROC(setattr, sattrargs, attrstat, fhandle, RC_REPLBUFF, ST+AT),
PROC(none, void, void, none, RC_NOCACHE, ST),
PROC(lookup, diropargs, diropres, fhandle, RC_NOCACHE, ST+FH+AT),
- PROC(readlink, fhandle, readlinkres, none, RC_NOCACHE, ST+1+256),
+ PROC(readlink, fhandle, readlinkres, none, RC_NOCACHE, ST+1+NFS_MAXPATHLEN),
PROC(read, readargs, readres, fhandle, RC_NOCACHE, ST+AT+1+NFSSVC_MAXBLKSIZE),
PROC(none, void, void, none, RC_NOCACHE, ST),
PROC(write, writeargs, attrstat, fhandle, RC_REPLBUFF, ST+AT),
--- linux.ORG/fs/nfsd/nfs3proc.c Mon Sep 16 11:18:26 2002
+++ linux/fs/nfsd/nfs3proc.c Tue Sep 17 16:06:41 2030
@@ -670,7 +670,7 @@ struct svc_procedure nfsd_procedures3[2
PROC(setattr, sattr, wccstat, fhandle, RC_REPLBUFF, ST+WC),
PROC(lookup, dirop, dirop, fhandle2, RC_NOCACHE, ST+FH+pAT+pAT),
PROC(access, access, access, fhandle, RC_NOCACHE, ST+pAT+1),
- PROC(readlink, fhandle, readlink, fhandle, RC_NOCACHE, ST+pAT+1+256),
+ PROC(readlink, fhandle, readlink, fhandle, RC_NOCACHE, ST+pAT+1+NFS3_MAXPATHLEN),
PROC(read, read, read, fhandle, RC_NOCACHE, ST+pAT+4+NFSSVC_MAXBLKSIZE),
PROC(write, write, write, fhandle, RC_REPLBUFF, ST+WC+4),
PROC(create, create, create, fhandle2, RC_REPLBUFF, ST+(1+FH+pAT)+WC),
-------------------------------------------------------
Sponsored by: AMD - Your access to the experts on Hammer Technology!
Open Source & Linux Developers, register now for the AMD Developer
Symposium. Code: EX8664 http://www.developwithamd.com/developerlab
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
On Tuesday September 17, [email protected] wrote:
> Hello,
>
> I found a trivial problem that kernel might warn "RPC request reserved
> 1144 but used 1936" when NFS-readlink is requested.
> This case will happen when symbolic-link file is very big
> as nfsd_procedure3[] table assumes max-size of symbolic-link file is
> 256 bytes.
> It should be change to NFS3_MAXPATHLEN.
Thanks.
The numbers in the tables are actually in units of 4bytes (32 bits),
so we need
NFS_MAXPATHLEN/4
and
NFS3_MAXPATHLEN/4
so the number in nfsproc was actually correct (though using the
symbolic value us better). The number in nfs3proc was wrong as
NFS3_MAXPATHLEN is 4096.
I'll send patches off to Linus and Marcelo shortly.
NeilBrown
>
>
> Here is a patch against linux-2.5.35.
> And we should also fix it on linux-2.4.19.
>
> Thank you,
> Hirokazu Takahashi.
>
> --- linux.ORG/fs/nfsd/nfsproc.c Mon Sep 16 11:18:25 2002
> +++ linux/fs/nfsd/nfsproc.c Tue Sep 17 16:07:04 2030
> @@ -545,7 +545,7 @@ struct svc_procedure nfsd_procedures2[1
> PROC(setattr, sattrargs, attrstat, fhandle, RC_REPLBUFF, ST+AT),
> PROC(none, void, void, none, RC_NOCACHE, ST),
> PROC(lookup, diropargs, diropres, fhandle, RC_NOCACHE, ST+FH+AT),
> - PROC(readlink, fhandle, readlinkres, none, RC_NOCACHE, ST+1+256),
> + PROC(readlink, fhandle, readlinkres, none, RC_NOCACHE, ST+1+NFS_MAXPATHLEN),
> PROC(read, readargs, readres, fhandle, RC_NOCACHE, ST+AT+1+NFSSVC_MAXBLKSIZE),
> PROC(none, void, void, none, RC_NOCACHE, ST),
> PROC(write, writeargs, attrstat, fhandle, RC_REPLBUFF, ST+AT),
> --- linux.ORG/fs/nfsd/nfs3proc.c Mon Sep 16 11:18:26 2002
> +++ linux/fs/nfsd/nfs3proc.c Tue Sep 17 16:06:41 2030
> @@ -670,7 +670,7 @@ struct svc_procedure nfsd_procedures3[2
> PROC(setattr, sattr, wccstat, fhandle, RC_REPLBUFF, ST+WC),
> PROC(lookup, dirop, dirop, fhandle2, RC_NOCACHE, ST+FH+pAT+pAT),
> PROC(access, access, access, fhandle, RC_NOCACHE, ST+pAT+1),
> - PROC(readlink, fhandle, readlink, fhandle, RC_NOCACHE, ST+pAT+1+256),
> + PROC(readlink, fhandle, readlink, fhandle, RC_NOCACHE, ST+pAT+1+NFS3_MAXPATHLEN),
> PROC(read, read, read, fhandle, RC_NOCACHE, ST+pAT+4+NFSSVC_MAXBLKSIZE),
> PROC(write, write, write, fhandle, RC_REPLBUFF, ST+WC+4),
> PROC(create, create, create, fhandle2, RC_REPLBUFF, ST+(1+FH+pAT)+WC),
>
>
>
> -------------------------------------------------------
> Sponsored by: AMD - Your access to the experts on Hammer Technology!
> Open Source & Linux Developers, register now for the AMD Developer
> Symposium. Code: EX8664 http://www.developwithamd.com/developerlab
> _______________________________________________
> NFS maillist - [email protected]
> https://lists.sourceforge.net/lists/listinfo/nfs
-------------------------------------------------------
This SF.NET email is sponsored by: AMD - Your access to the experts
on Hammer Technology! Open Source & Linux Developers, register now
for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs