ia64/xen-unstable

changeset 895:e50a38309067

bitkeeper revision 1.563 (3fa90024LzzVnnkZsqlSu4CqEMBe_Q)

fix for scsi
author smh22@labyrinth.cl.cam.ac.uk
date Wed Nov 05 13:50:28 2003 +0000 (2003-11-05)
parents 92d4612dd1bc
children 352a82eb57ad
files xen/drivers/block/xen_block.c
line diff
     1.1 --- a/xen/drivers/block/xen_block.c	Wed Nov 05 11:57:30 2003 +0000
     1.2 +++ b/xen/drivers/block/xen_block.c	Wed Nov 05 13:50:28 2003 +0000
     1.3 @@ -536,15 +536,20 @@ static void dispatch_rw_block_io(struct 
     1.4  	rc = vbd_translate(&phys_seg[nr_psegs], &new_segs, p, operation); 
     1.5  
     1.6  	/* If it fails we bail (unless the caller is priv => has raw access) */
     1.7 -	if(rc && !IS_PRIV(p)) { 
     1.8 -	    printk("access denied: attempted %s of [%ld,%ld] on dev=%04x\n", 
     1.9 -		   operation == READ ? "read" : "write", 
    1.10 -		   req->sector_number + tot_sects, 
    1.11 -		   req->sector_number + tot_sects + nr_sects, 
    1.12 -		   req->device); 
    1.13 -	    goto bad_descriptor;
    1.14 +	if(rc) { 
    1.15 +	    if(!IS_PRIV(p)) {
    1.16 +		printk("access denied: %s of [%ld,%ld] on dev=%04x\n", 
    1.17 +		       operation == READ ? "read" : "write", 
    1.18 +		       req->sector_number + tot_sects, 
    1.19 +		       req->sector_number + tot_sects + nr_sects, 
    1.20 +		       req->device); 
    1.21 +		goto bad_descriptor;
    1.22 +	    }
    1.23 +
    1.24 +	    /* SMH: skanky hack; clear any 'partition' info in device */
    1.25 +	    phys_seg[nr_psegs].dev = req->device & 0xFFF0;
    1.26  	}
    1.27 -	    
    1.28 +	 
    1.29          nr_psegs += new_segs;
    1.30          if ( nr_psegs >= (MAX_BLK_SEGS*2) ) BUG();
    1.31      }