pvops/xen-blkfront: handle FDEJECT as detach request (#630)

This commit is contained in:
Marek Marczykowski 2012-07-15 19:57:47 +02:00
parent 4e68eab71a
commit 3cf4f5ea0e
2 changed files with 21 additions and 0 deletions

View File

@ -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 <linux/mutex.h>
#include <linux/scatterlist.h>
#include <linux/bitmap.h>
+#include <linux/fd.h>
#include <xen/xen.h>
#include <xen/xenbus.h>
@@ -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",

View File

@ -12,3 +12,4 @@ patches.xen/pvops-0011-x86-PCI-Expand-the-x86_msi_ops-to-have-a-restore-MSI.patc
patches.xen/pvops-enable-netfront-in-dom0.patch patches.xen/pvops-enable-netfront-in-dom0.patch
patches.xen/pvops-netback-calculate-correctly-the-SKB-slots.patch patches.xen/pvops-netback-calculate-correctly-the-SKB-slots.patch
patches.xen/pvops-blkfront-removable-flag.patch patches.xen/pvops-blkfront-removable-flag.patch
patches.xen/pvops-blkfront-eject-support.patch