From: Ed L Cashin <ecashin@coraid.com>
To: linux-kernel@vger.kernel.org
Cc: Jim MacBaine <jmacbaine@gmail.com>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: aoe fails on sparc64
Date: Fri, 16 Sep 2005 09:36:51 -0400 [thread overview]
Message-ID: <87u0glxhfw.fsf@coraid.com> (raw)
In-Reply-To: 3afbacad0508310630797f397d@mail.gmail.com
[-- Attachment #1: Type: text/plain, Size: 901 bytes --]
Jim MacBaine <jmacbaine@gmail.com> writes:
> Hello,
>
> Using aoe on a sparc64 system gives strange results:
>
> sunny:/dev/etherd# echo >discover
> sunny:/dev/etherd# mke2fs e0.0
> mke2fs 1.37 (21-Mar-2005)
> mke2fs: File too large while trying to determine filesystem size
> sunny:/dev/etherd# blockdev --getsz e0.0
> -4503599627370496
>
> The log says:
>
> Aug 31 15:18:49 sunny kernel: devfs_mk_dir: invalid argument.<6>
> etherd/e0.0: unknown partition table
> Aug 31 15:18:49 sunny kernel: aoe: 0011d8xxxxxx e0.0 v4000 has
> 67553994410557440
> sectors
>
> The system is an Sun Ultra 5, running 2.6.12.5/sparc64 compiled with
> gcc-3.4.2. e0.0 is exported on a x86 system using vblade-5, and has a
> size of 30 MB.
I've been working with Jim MacBaine, and he reports that the patch
below gets rid of the problem. I don't know why. When I test
le64_to_cpup by itself, it works as expected.
[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 566 bytes --]
Index: linux-2.6.13/drivers/block/aoe/aoecmd.c
===================================================================
--- linux-2.6.13.orig/drivers/block/aoe/aoecmd.c 2005-08-31 17:03:52.000000000 -0400
+++ linux-2.6.13/drivers/block/aoe/aoecmd.c 2005-09-15 15:44:41.000000000 -0400
@@ -320,7 +320,8 @@
d->flags |= DEVFL_EXT;
/* word 100: number lba48 sectors */
- ssize = le64_to_cpup((__le64 *) &id[100<<1]);
+ ssize = *((u64 *) &id[100<<1]);
+ ssize = le64_to_cpu(ssize);
/* set as in ide-disk.c:init_idedisk_capacity */
d->geo.cylinders = ssize;
[-- Attachment #3: Type: text/plain, Size: 41 bytes --]
--
Ed L Cashin <ecashin@coraid.com>
next prev parent reply other threads:[~2005-09-16 13:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-31 13:30 aoe fails on sparc64 Jim MacBaine
2005-08-31 15:50 ` Ed L Cashin
2005-09-01 6:24 ` David S. Miller
2005-09-01 19:13 ` Ed L Cashin
2005-09-01 19:45 ` David S. Miller
2005-09-03 16:06 ` Jim MacBaine
2005-09-06 20:31 ` Ed L Cashin
2005-09-09 14:06 ` Ed L Cashin
2005-09-16 13:36 ` Ed L Cashin [this message]
2005-09-16 20:34 ` David S. Miller
2005-09-16 23:35 ` David S. Miller
2005-09-17 10:10 ` Jim MacBaine
2005-09-18 6:12 ` David S. Miller
2005-09-19 14:24 ` Ed L Cashin
2005-09-19 18:21 ` David S. Miller
2005-09-19 18:29 ` Roland Dreier
2005-09-19 18:38 ` Ed L Cashin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87u0glxhfw.fsf@coraid.com \
--to=ecashin@coraid.com \
--cc=davem@davemloft.net \
--cc=jmacbaine@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.