nfs_fsinfo->bsize size (2.4.2)
Hello!
Some time ago I had an undefined symbol in kernel compilation (__mul64) It was sparc architecture, cross compilation on solaris/sparc. I have found that 64-bit multiplication is in nfs2xdr.c, nfs_xdr_statfsres function. The multiplication is by nfs_fsinfo->bsize.
For some reason nfs_fsinfo->bsize is declared as __u64. I don't see how block size can be greater that 2G. What is the reason behind such type for block size?
I did the following change and nfs still works fine. I've also rearranged structure fields for alignment reasons.
linux/nfs_xdr.h renamed from linux/nfs_xdr.h.1 +1 -1
@@ -47,8 +47,8 @@__u32 wtpref;/* pref. write transfer size */ __u32 wtmult;/* writes should be multiple of this */ __u32 dtpref;/* pref. readdir transfer size */ +__u32 bsize;/* block size */ __u64 maxfilesize; -__u64 bsize;/* block size */ __u64 tbytes;/* total size in bytes */ __u64 fbytes;/* # of free bytes */ __u64 abytes;/* # of bytes available to user */
Signature · 1 line
Alexander. | http://www.yars.free.net/~lav/