lkml.org 
[lkml]   [2000]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.3.51: NFSv3 uses multiplication with u64
On Wed, Mar 15, 2000 at 11:54:39AM -0400, Horst von Brand wrote:
> Horst von Brand <vonbrand@inf.utfsm.cl> said:
> > The build of the kernel on SPARC fails when linking due to use of _muldi3
> > in nfs3svc_encode_fsstatres (file fs/nfsd/nfs3xdr.c):
>
> [...]
>
> Dumb typo. Fixed patch is:

Please don't. It is already fixed in the sparc32 CVS tree (__muldi3 was
added and exported) and your patch will the thing not work properly if
total bytes, free bytes or user available bytes are higher than 4GB.

>
> --- fs/nfsd/nfs3xdr.c.dist-2.3.51 Tue Mar 14 16:24:03 2000
> +++ fs/nfsd/nfs3xdr.c Tue Mar 14 16:46:33 2000
> @@ -773,9 +773,9 @@
> *p++ = xdr_zero; /* no post_op_attr */
>
> if (resp->status == 0) {
> - p = xdr_encode_hyper(p, (u64) bs * s->f_blocks); /* total bytes */
> - p = xdr_encode_hyper(p, (u64) bs * s->f_bfree); /* free bytes */- p = xdr_encode_hyper(p, bs * s->f_bavail); /* user available bytes */
> + p = xdr_encode_hyper(p, (u64) (bs * s->f_blocks)); /* total bytes */
> + p = xdr_encode_hyper(p, (u64) (bs * s->f_bfree)); /* free bytes */
> + p = xdr_encode_hyper(p, (u64) (bs * s->f_bavail)); /* user available bytes */
> p = xdr_encode_hyper(p, s->f_files); /* total inodes */
> p = xdr_encode_hyper(p, s->f_ffree); /* free inodes */
> p = xdr_encode_hyper(p, s->f_ffree); /* user available inodes */

Cheers,
Jakub
___________________________________________________________________
Jakub Jelinek | jakub@redhat.com | http://sunsite.mff.cuni.cz/~jj
Linux version 2.3.99-pre1 on a sparc64 machine (1343.49 BogoMips)
___________________________________________________________________

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.043 / U:0.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site