All of lore.kernel.org
 help / color / mirror / Atom feed
* xen vbd: better.
@ 2004-10-22  5:53 Ronald G. Minnich
  2004-10-22  7:49 ` Keir Fraser
  0 siblings, 1 reply; 7+ messages in thread
From: Ronald G. Minnich @ 2004-10-22  5:53 UTC (permalink / raw)
  To: xen-devel


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. 

And yes, I'm well aware that kencc isn't C9x, but ... it's a nice C 
anyway. 

Now, I am getting back a nonsensical result for the disk size. 

The partition in question is /dev/hda1, which is this:

Disk /dev/hda: 60.0 GB, 60011642880 bytes
240 heads, 63 sectors/track, 7752 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1      1324  10009408+   7  HPFS/NTFS
/dev/hda2          1325      7154  44074800   83  Linux
/dev/hda3          7155      7287   1005480   82  Linux swap

(yes, I plan to wipe out Windows/XP in favor of Plan 9 on Xen).

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?

thanks

ron


-------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-10-22 19:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-22  5:53 xen vbd: better Ronald G. Minnich
2004-10-22  7:49 ` Keir Fraser
2004-10-22 15:28   ` Ronald G. Minnich
2004-10-22 18:50   ` Ronald G. Minnich
2004-10-22 19:08     ` Keir Fraser
2004-10-22 19:15       ` Ronald G. Minnich
2004-10-22 19:22       ` Avery Pennarun

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.