[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Allow blkback to be built as a module.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID ead0b7fcad3a8868ad753c5592a096f5506542cf
# Parent  8ac43508b33bb50a96dd7b99c227cf36c8066f9d
Allow blkback to be built as a module.

From: Jan Beulich

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 8ac43508b33b -r ead0b7fcad3a linux-2.6-xen-sparse/drivers/xen/Kconfig
--- a/linux-2.6-xen-sparse/drivers/xen/Kconfig  Tue Feb 28 17:15:18 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/Kconfig  Tue Feb 28 17:56:00 2006
@@ -68,7 +68,7 @@
        default n
 
 config XEN_BLKDEV_BACKEND
-       bool "Block-device backend driver"
+       tristate "Block-device backend driver"
        default y
        help
          The block-device backend driver allows the kernel to export its
@@ -76,7 +76,7 @@
          interface.
 
 config XEN_BLKDEV_TAP_BE
-        bool "Block Tap support for backend driver (DANGEROUS)"
+        tristate "Block Tap support for backend driver (DANGEROUS)"
         depends on XEN_BLKDEV_BACKEND
         default n
         help
@@ -145,7 +145,7 @@
          (domain 0), then you almost certainly want to say Y here.
 
 config XEN_BLKDEV_TAP
-       bool "Block device tap driver"
+       tristate "Block device tap driver"
        default n
        help
          This driver allows a VM to interact on block device channels
diff -r 8ac43508b33b -r ead0b7fcad3a 
linux-2.6-xen-sparse/drivers/xen/blkback/Makefile
--- a/linux-2.6-xen-sparse/drivers/xen/blkback/Makefile Tue Feb 28 17:15:18 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/blkback/Makefile Tue Feb 28 17:56:00 2006
@@ -1,2 +1,3 @@
+obj-$(CONFIG_XEN_BLKDEV_BACKEND) := blkbk.o
 
-obj-y  := blkback.o xenbus.o interface.o vbd.o
+blkbk-y        := blkback.o xenbus.o interface.o vbd.o
diff -r 8ac43508b33b -r ead0b7fcad3a 
linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c        Tue Feb 28 
17:15:18 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c        Tue Feb 28 
17:56:00 2006
@@ -29,14 +29,10 @@
  * 64 should be enough to keep us competitive with Linux.
  */
 static int blkif_reqs = 64;
+module_param_named(reqs, blkif_reqs, int, 0);
+MODULE_PARM_DESC(reqs, "Number of blkback requests to allocate");
+
 static int mmap_pages;
-
-static int __init set_blkif_reqs(char *str)
-{
-       get_option(&str, &blkif_reqs);
-       return 1;
-}
-__setup("blkif_reqs=", set_blkif_reqs);
 
 /* Run-time switchable: /sys/module/blkback/parameters/ */
 static unsigned int log_stats = 0;
@@ -574,10 +570,20 @@
                list_add_tail(&pending_reqs[i].free_list, &pending_free);
     
        blkif_xenbus_init();
+       __unsafe(THIS_MODULE);
        return 0;
 }
 
-__initcall(blkif_init);
+module_init(blkif_init);
+
+static void blkif_exit(void)
+{
+       BUG();
+}
+
+module_exit(blkif_exit);
+
+MODULE_LICENSE("Dual BSD/GPL");
 
 /*
  * Local variables:

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.