ia64/xen-unstable

changeset 543:aa26e81d8c04

bitkeeper revision 1.302 (3f0ac82dINhdLC_gSixgqsq54YoRug)

Argg... the physdev code needs Xen block device numbers, not
physical numbers.
author sos22@labyrinth.cl.cam.ac.uk
date Tue Jul 08 13:33:33 2003 +0000 (2003-07-08)
parents eacf3abcd1da
children 43143729d373
files xen/drivers/block/xen_block.c
line diff
     1.1 --- a/xen/drivers/block/xen_block.c	Tue Jul 08 13:30:44 2003 +0000
     1.2 +++ b/xen/drivers/block/xen_block.c	Tue Jul 08 13:33:33 2003 +0000
     1.3 @@ -661,21 +661,22 @@ static void dispatch_rw_block_io(struct 
     1.4          }
     1.5          else
     1.6          {
     1.7 -            phys_seg[nr_psegs].dev           = xendev_to_physdev(req->device);
     1.8 +	    phys_seg[nr_psegs].dev           = req->device;
     1.9              phys_seg[nr_psegs].sector_number = req->sector_number + tot_sects;
    1.10              phys_seg[nr_psegs].buffer        = buffer;
    1.11              phys_seg[nr_psegs].nr_sects      = nr_sects;
    1.12 -            if ( phys_seg[nr_psegs].dev == 0 ) 
    1.13 -	    {
    1.14 -	        DPRINTK("bad device\n");
    1.15 -	        goto bad_descriptor;
    1.16 -	    }
    1.17  	    if (p->domain != 0 &&
    1.18  		!xen_physdisk_access_okay(&phys_seg[nr_psegs], p, operation)) {
    1.19  	      DPRINTK("access denied\n");
    1.20  	      /* XXX not quite right, but close enough. */
    1.21  	      goto bad_descriptor;
    1.22  	    }
    1.23 +	    phys_seg[nr_psegs].dev           = xendev_to_physdev(req->device);
    1.24 +            if ( phys_seg[nr_psegs].dev == 0 ) 
    1.25 +	    {
    1.26 +	        DPRINTK("bad device\n");
    1.27 +	        goto bad_descriptor;
    1.28 +	    }
    1.29              new_segs = 1;
    1.30          }
    1.31