lkml.org 
[lkml]   [2001]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectnfs_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.

--- include/linux/nfs_xdr.h.1 Fri Apr 6 17:57:25 2001
+++ include/linux/nfs_xdr.h Fri Apr 6 17:59:14 2001
@@ -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 */
--
Alexander. | http://www.yars.free.net/~lav/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:17    [W:0.023 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site