WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Blkfront support for get geometry ioctl

To: Ian Pratt <Ian.Pratt@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] Blkfront support for get geometry ioctl
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Wed, 01 Sep 2004 14:50:14 +0100
Cc: Stephen Childs <Stephen.Childs@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 01 Sep 2004 15:06:19 +0100
Envelope-to: steven.hand@xxxxxxxxxxxx
In-reply-to: Your message of "Wed, 01 Sep 2004 13:16:26 BST." <E1C2U2M-0006ix-00@xxxxxxxxxxxxxxxxx>
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
> > Do you think it would be possible to return geometry values that are at 
> > least consistent with the size of the device? Something like this (still 
> > has 
> > hard-coded heads and sectors, but calculates cyls based on size of disk):
> 
> It certainly seems sensible to return geometry that approximates
> the "disk's" total size. Your current patch can 'waste' up to 8MB
> of disk space. Do you think it's worth doing something iterative
> that plays around with different numbers of heads and sectors to
> find a total <= disk size?
> 
> I'll bet there's some stock code we could use to do this...

Probably not worth it -- any sane program ought to be using BLKGETSIZE
or BLKGETSIZE64. I think a simple "good enough" estimate will do for
GETGEO. 

At the same time as checking in that patch, we should also investigate
why 2.6 has a completely different ioctl implementation that doesn't
actually do anything! Merging the two ioctl functions would seem a
good idea.

 -- Keir


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel