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] linux-2.4.29-xenU and blockdev --getss

On Sat, Feb 12, 2005 at 07:37:12PM -0000, Ian Pratt wrote:
>  
> 
> > When I run blockdev --getss on Xen 2.0 Linux-2.4.29-xenU I get this:
> > 
> > $ blockdev --getss /dev/sda4
> > -1
> 
> I'll wager that there's some ioctl we're failing to implement, and that 
> blockdev doesn't check its return code.
> 
> Perhaps someone could add some tracing to blkfront.c to find out which ioctl.
> 

This patch (by Jari Ruusu) seems to fix the problem:

---
xen-2.0/linux-2.4.29-xen-sparse/arch/xen/drivers/blkif/frontend/vbd.c.old Fri 
Feb  4 15:38:31 2005
+++ xen-2.0/linux-2.4.29-xen-sparse/arch/xen/drivers/blkif/frontend/vbd.c Sun 
Feb 13 19:05:36 2005
@@ -288,7 +288,7 @@
         /* Need to skankily setup 'partition' information */
         gd->part[minor].start_sect = 0;
         gd->part[minor].nr_sects   = capacity;
-        gd->sizes[minor]           = capacity;
+        gd->sizes[minor]           = capacity>>(BLOCK_SIZE_BITS-9);

         gd->flags[minor >> gd->minor_shift] |= GENHD_FL_VIRT_PARTNS;
     }



After applying that patch the loopback-mounted devices have correct size
under xenU.. 

-- Pasi Kärkkäinen
       
                                   ^
                                .     .
                                 Linux
                              /    -    \
                             Choice.of.the
                           .Next.Generation.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>