WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Re: [5 Patches] Synchronize blktap with citrix blktap2.
From: Ben Guthro <ben.guthro@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 03 Apr 2009 12:58:57 -0400
Cc: Dutch Meyer <dmeyer@xxxxxxxxx>
Delivery-date: Fri, 03 Apr 2009 09:59:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1238770391.6535.52.camel@bguthro-desktop>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1238770391.6535.52.camel@bguthro-desktop>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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