lkml.org 
[lkml]   [2005]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: aoe fails on sparc64
From
From: Ed L Cashin <ecashin@coraid.com>
Date: Wed, 31 Aug 2005 11:50:55 -0400

> Jim MacBaine <jmacbaine@gmail.com> writes:
>
> > 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
>
> OK. 67553994410557440 is 61440 byte swapped in 64 bits, and 30MB is
> 61440 sectors, so this should be a simple byte order fix.

More strangely, the upper and lower 32-bit words are swapped.
The bytes within each 32-bit word are swapped correctly.

So the calculation maybe should be something like:

__le32 *p = (__le32 *) &id[100 << 1];
u32 high32 = le32_to_cpup(p);
u32 low32 = le32_to_cpup(p + 1);

ssize = (((u64)high32 << 32) | (u64) low32);

But that doesn't make any sense, and even ide_fix_driveid() in
drivers/ide/ide-iops.c does a le64_to_cpu() for this value:

id->lba_capacity_2 = __le64_to_cpu(id->lba_capacity_2);

I wonder if this is some artifact of how AOE devices encode
this field when sending it to the client.
-
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-09-01 08:29    [W:0.177 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site