Skip to contentSkip to conversation

]PATCH] Modular blktap

PATCH Charles Coffing 2 participants 2 messages Oct 30, 2006 – Oct 31, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Kconfig allows blktap to be built as a module, but drivers/xen/blktap/Makefile doesn't work. The attached patch fixes the makefile to match Kconfig.

However, due to the linux build system, drivers/xen/blktap/blktap.c must be renamed (it can't be the same name as the resulting module). Rename it to "blocktap.c" before applying the patch.

Please apply to xen-unstable.

Thanks...

linux-2.6-xen-sparse/drivers/xen/blktap/Makefile +2 -1
@@ -1,3 +1,4 @@
 LINUXINCLUDE += -I../xen/include/public/io
-obj-y	:= xenbus.o interface.o blktap.o 
+obj-$(CONFIG_XEN_BLKDEV_TAP) := blktap.o
+blktap-y	:= xenbus.o interface.o blocktap.o
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 3 lines
Quoted 1 line
Quoted 1 line

"Charles Coffing" <[email protected]> 31.10.06 00:56 >>>

Kconfig allows blktap to be built as a module, but drivers/xen/blktap/Makefile doesn't work. The attached patch fixes the makefile to match Kconfig.

Hmm, I'm a little surprised you sent this version, when we know there are two more issues (zap_page_range not being exported and __setup() having no effect in a module).
Also, as a general note to the list, I think there was agreement that the use of zap_page_range() in blktap is superfluous and/or inappropriate, but it seems no-one submitted a patch to address this, yet. Once such a patch appears, the exporting of zap_page_range() should obviously be reverted.

Quoted 3 lines

However, due to the linux build system, drivers/xen/blktap/blktap.c must be renamed (it can't be the same name as the resulting module). Rename it to "blocktap.c" before applying the patch.

Jan

drivers/xen/blktap/Makefile +2 -1
Index: head-2006-10-16/drivers/xen/blktap/Makefile
===================================================================
@@ -1,3 +1,4 @@
 LINUXINCLUDE += -I../xen/include/public/io
-obj-y	:= xenbus.o interface.o blktap.o 
+obj-$(CONFIG_XEN_BLKDEV_TAP) := blktap.o
+blkbktap-y	:= xenbus.o interface.o blocktap.o
 
drivers/xen/blktap/blktap.c +1 -7
Index: head-2006-10-16/drivers/xen/blktap/blktap.c
===================================================================
@@ -134,13 +134,7 @@ typedef struct domid_translate {
 static domid_translate_t  translate_domid[MAX_TAP_DEV];
 static tap_blkif_t *tapfds[MAX_TAP_DEV];
 
-static int __init set_blkif_reqs(char *str)
-{
-	get_option(&str, &blkif_reqs);
-	return 1;
-}
-__setup("blkif_reqs=", set_blkif_reqs);
-
+module_param(blkif_reqs, int, 0);
 /* Run-time switchable: /sys/module/blktap/parameters/ */
 static unsigned int log_stats = 0;
 static unsigned int debug_lvl = 0;
mm/memory.c +2 -0
Index: head-2006-10-16/mm/memory.c
===================================================================
@@ -895,6 +895,8 @@ unsigned long zap_page_range(struct vm_a
 	return end;
 }
 
+EXPORT_SYMBOL_GPL(zap_page_range);
+
 /*
  * Do a quick page-table lookup for a single page.
  */