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

[Xen-devel] Re: [5 Patches] Synchronize blktap with citrix blktap2.



This patch compiles against the new blktap...but not really knowing much
about the code, I can't tell you if I have broken something or not. It
remains untested, for now because of this.

It seems that the "readonly" flag was removed...but I can't seem to find
much documentation, or examples on how this might be used, so I might be
way off base here

The introduction of the new blktaplib.h does introduce a significant
number of new warnings to the qemu build though.



On Fri, 2009-04-03 at 10:53 -0400, Ben Guthro wrote:
> I started to look into these patches, to try to evaluate how much
> performance improvement this re-write gives, but have a problem with the
> way this works.
> 
> As I understand the patch set in userspace you:
> 1. move the old blktap dir to blktap_old
> 2. introduce the new blktap2 code in blktap
> 
> However, these changes that you are making to qemu merely link against
> the old libraries, rather than adjusting the include paths to include
> the new headers, and compile/link against the new blktap2?
> 
> Won't this cause problems when you actually go to use tapdisk?
> 
> Am I missing something here?
> 
> Ben
> 
> 
>         I've been reminded that the ioemu patch to update the blktap 
> dependencies in that repo is still necessary. It is available here:
>         
> http://www.cs.ubc.ca/~dmeyer/blktap2/tools_ioemu_dir_use_blktap_old.patch
>         
>         --Dutch
>                         
diff --git a/Makefile b/Makefile
index c395e77..51221f7 100644
--- a/Makefile
+++ b/Makefile
@@ -47,7 +47,7 @@ $(filter %-user,$(SUBDIR_RULES)): libqemu_user.a
 recurse-all: $(SUBDIR_RULES)
 
 tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/libxc
-tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/blktap/lib
+tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/blktap/include
 tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/xenstore
 tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/include
 tapdisk-ioemu: tapdisk-ioemu.c cutils.c block.c block-raw.c block-cow.c 
block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c 
block-vpc.c block-vvfat.c block-qcow2.c hw/xen_blktap.c osdep.c
diff --git a/hw/xen_blktap.c b/hw/xen_blktap.c
index 24d10a3..7fdeaa7 100644
--- a/hw/xen_blktap.c
+++ b/hw/xen_blktap.c
@@ -218,7 +218,7 @@ static int map_new_dev(struct td_state *s, int minor)
        return -1;
 }
 
-static int open_disk(struct td_state *s, char *path, int readonly)
+static int open_disk(struct td_state *s, char *path)
 {
        BlockDriverState* bs;
        char* devname;
@@ -236,7 +236,6 @@ static int open_disk(struct td_state *s, char *path, int 
readonly)
        }
 
        s->bs = bs;
-       s->flags = readonly ? TD_RDONLY : 0;
        s->size = bs->total_sectors;
        s->sector_size = 512;
 
@@ -521,7 +520,7 @@ static void handle_blktap_ctrlmsg(void* private)
                        s = state_init();
 
                        /*Open file*/
-                       if (s == NULL || open_disk(s, path, msg->readonly)) {
+                       if (s == NULL || open_disk(s, path)) {
                                msglen = sizeof(msg_hdr_t);
                                msg->type = CTLMSG_IMG_FAIL;
                                msg->len = msglen;
diff --git a/xen-hooks.mak b/xen-hooks.mak
index c6b4f8c..108d2fb 100644
--- a/xen-hooks.mak
+++ b/xen-hooks.mak
@@ -43,8 +43,7 @@ CONFIG_SDL=
 CONFIG_AUDIO=
 OBJS += xenfbfront.o
 else
-CPPFLAGS+= -I$(XEN_ROOT)/tools/blktap/lib
-LIBS += -L$(XEN_ROOT)/tools/blktap/lib -lblktap
+CPPFLAGS+= -I$(XEN_ROOT)/tools/blktap/include
 OBJS += xen_blktap.o
 OBJS += tpm_tis.o
 endif
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

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