[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] xen vbd: better.



> 
> OK, this is all boiling down to 8c/gcc differences of opinion. 
> Interesting, as things were designed in the Xen communications with the 
> reasonable expectation that on the same architecture you ought to be able 
> to pass around binary structs in event channels without standard RPC 
> marshall/de-marshall guck. That's how I read it anyway. 
> 
> It's portable on same machine, same compiler, even to different OSes, but 
> not to same machine, different compiler. Interesting. So I am having to 
> put marshall/demarshall code into the Plan 9 code that sends messages to 
> Xen. 

It certainly should be portable to any machine, any compiler, modulo:
 1. Endianness issues
 2. A sane compiler that supports packed structs.

How can you get any low-level systems work done without supporting
data interoperability via packed structs? How can you define sane
network header structs for example? You can't know that your compiler
won't pack your IP header layout incorrectly!

The endianness issues we can deal with later if necessary. Generally I
expect that we won't be messaging cross-architecture so it'll be a
non-issue. 

> The info packet for that partition comes back as this: 
> 0x0: 02 4f 6e 00 00 00 00 00 01 03 e0 00
> 
> translated, it is 0x6e4f02 of capacity, 0x301 device (hda1! yay!), flags 
> e0 (DISK, VIRTUAL, READONLY) (all of which I understand save VIRTUAL -- I 
> guess that means a partition, not the whole disk).
> 
> 0x6e4f02 is in decimal 7229186. That number makes no sense. It's not the 
> number of blocks, or the number of bytes per unit, or ... 
> 
> Can somebody clear me up on this simple algebra problem?

It is the capacity in 512-byte sectors.

 -- Keir


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.