From e45b11c7736d4332fc75104f4777ccf5c7f61d22 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Sun, 15 Jul 2012 19:57:47 +0200 Subject: [PATCH] pvops/xen-blkfront: handle FDEJECT as detach request (#630) --- .../pvops-blkfront-eject-support.patch | 20 +++++++++++++++++++ series-pvops.conf | 1 + 2 files changed, 21 insertions(+) create mode 100644 patches.xen/pvops-blkfront-eject-support.patch diff --git a/patches.xen/pvops-blkfront-eject-support.patch b/patches.xen/pvops-blkfront-eject-support.patch new file mode 100644 index 0000000..e304ed6 --- /dev/null +++ b/patches.xen/pvops-blkfront-eject-support.patch @@ -0,0 +1,20 @@ +--- linux-3.4.1.orig/drivers/block/xen-blkfront.c 2012-06-01 09:18:44.000000000 +0200 ++++ linux-3.4.1/drivers/block/xen-blkfront.c 2012-07-15 15:54:31.350255623 +0200 +@@ -44,6 +44,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -241,6 +264,9 @@ + return 0; + return -EINVAL; + } ++ case FDEJECT: ++ xenbus_switch_state(info->xbdev, XenbusStateClosing); ++ return 0; + + default: + /*printk(KERN_ALERT "ioctl %08x not supported by Xen blkdev\n", diff --git a/series-pvops.conf b/series-pvops.conf index f4df209..f143a53 100644 --- a/series-pvops.conf +++ b/series-pvops.conf @@ -17,3 +17,4 @@ patches.xen/pvops-3.4-x86-cpa-Use-pte_attrs-instead-of-pte_flags-on-CPA-se.patch # Additional features patches.xen/pvops-3.4-0100-usb-xen-pvusb-driver.patch patches.xen/pvops-blkfront-removable-flag.patch +patches.xen/pvops-blkfront-eject-support.patch