ia64/xen-unstable

changeset 5040:e5ee1635b8ee

bitkeeper revision 1.1485 (428df22fkTwCIupDtELAwUuLnujDkQ)

Manual merge.
author kaf24@firebug.cl.cam.ac.uk
date Fri May 20 14:20:31 2005 +0000 (2005-05-20)
parents 847a499e8b29
children 45a82b5f9fbe
files linux-2.6.11-xen-sparse/drivers/xen/blkback/vbd.c
line diff
     1.1 --- a/linux-2.6.11-xen-sparse/drivers/xen/blkback/vbd.c	Fri May 20 14:17:35 2005 +0000
     1.2 +++ b/linux-2.6.11-xen-sparse/drivers/xen/blkback/vbd.c	Fri May 20 14:20:31 2005 +0000
     1.3 @@ -78,7 +78,6 @@ void vbd_create(blkif_be_vbd_create_t *c
     1.4  
     1.5      vbd->vdevice  = vdevice; 
     1.6      vbd->readonly = create->readonly;
     1.7 -    vbd->type     = VDISK_TYPE_DISK | VDISK_FLAG_VIRT;
     1.8  
     1.9      /* Mask to 16-bit for compatibility with old tools */
    1.10      vbd->pdevice  = create->pdevice & 0xffff;
    1.11 @@ -101,6 +100,9 @@ void vbd_create(blkif_be_vbd_create_t *c
    1.12          bdev_put(vbd->bdev);
    1.13          return;
    1.14      }
    1.15 +
    1.16 +    vbd->type = (vbd->bdev->bd_disk->flags & GENHD_FL_CD) ?
    1.17 +        VDISK_TYPE_CDROM : VDISK_TYPE_DISK;
    1.18  #else
    1.19      if ( (blk_size[MAJOR(vbd->pdevice)] == NULL) || (vbd_sz(vbd) == 0) )
    1.20      {
    1.21 @@ -108,6 +110,8 @@ void vbd_create(blkif_be_vbd_create_t *c
    1.22          create->status = BLKIF_BE_STATUS_PHYSDEV_NOT_FOUND;
    1.23          return;
    1.24      }
    1.25 +
    1.26 +    vbd->type = VDISK_TYPE_DISK;
    1.27  #endif
    1.28  
    1.29      spin_lock(&blkif->vbd_lock);