2012-06-11 20:49:31 +00:00
|
|
|
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
|
|
|
|
index 4e86393..34493d7 100644
|
|
|
|
--- a/drivers/block/xen-blkfront.c
|
|
|
|
+++ b/drivers/block/xen-blkfront.c
|
|
|
|
@@ -1188,7 +1188,7 @@ static void blkfront_connect(struct blkfront_info *info)
|
2013-09-20 03:31:38 +00:00
|
|
|
unsigned int physical_sector_size;
|
2012-06-11 20:49:31 +00:00
|
|
|
unsigned int binfo;
|
|
|
|
int err;
|
2013-05-24 02:31:00 +00:00
|
|
|
- int barrier, flush, discard, persistent;
|
|
|
|
+ int barrier, flush, discard, persistent, removable;
|
2012-06-11 20:49:31 +00:00
|
|
|
|
|
|
|
switch (info->connected) {
|
|
|
|
case BLKIF_STATE_CONNECTED:
|
|
|
|
@@ -1266,6 +1266,12 @@ static void blkfront_connect(struct blkfront_info *info)
|
|
|
|
if (!err && discard)
|
|
|
|
blkfront_setup_discard(info);
|
|
|
|
|
|
|
|
+ err = xenbus_gather(XBT_NIL, info->xbdev->otherend,
|
|
|
|
+ "removable", "%d", &removable,
|
|
|
|
+ NULL);
|
|
|
|
+ if (!err && removable)
|
|
|
|
+ binfo |= VDISK_REMOVABLE;
|
|
|
|
+
|
2013-05-24 02:31:00 +00:00
|
|
|
err = xenbus_gather(XBT_NIL, info->xbdev->otherend,
|
|
|
|
"feature-persistent", "%u", &persistent,
|
|
|
|
NULL);
|