qubes-linux-kernel/patches.xen/pvops-blkfront-removable-flag.patch
Marek Marczykowski-Górecki 96d320d4e0 version 3.11.1-1
Finally ACPI S3 patches are fully integrated in upstream kernel.
This commits comes with updates for other patches and of course kernel
config.
2013-09-20 05:31:38 +02:00

27 lines
899 B
Diff

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)
unsigned int physical_sector_size;
unsigned int binfo;
int err;
- int barrier, flush, discard, persistent;
+ int barrier, flush, discard, persistent, removable;
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;
+
err = xenbus_gather(XBT_NIL, info->xbdev->otherend,
"feature-persistent", "%u", &persistent,
NULL);