tools: Upstream blktap "2.5" as an external repo
cover tools: Upstream blktap "2.5" as an external repo
For some time, the blktap2 in-tree has bitrotted. Many years ago the XenServer team at Citrix forked the code into a separate repository; several attempts have been made to upstream those changes back into Xen, to no avail.
The blktap code at the moment is the only source of performant vhd format integration. It's additionally in use by projects like the COLO project.
This patch series removes the in-tree blktap2 code and treats the XenServer blktap tree as an upstream. I've gotten agreement from the XenServer team to act as an upstream -- to accept patches fixing bugs, to help track down errors, and to attempt to help fix build breakages introduced by development.
At the moment we're using the "blktap2" branch of XenServer's blktap.git. (This has been sometimes known as "blktap 2.5".) This branch is maintianed in order to provide a buildroot for OpenStack, and has also been used by the CentOS xen packages for several years now.
The series consists of four patches:
1/4 Reorg tools/Makefile so all "external repo" targets are together
2/4 Add external blktap repo; build but don't install
3/4 Modify libxl to use external repo; stop building in-tree blktap2
4/4 Remove blktap2 from xen.git
The last patch is pretty massive and not very interesting, so it won't be sent with this series. The full patch series can be found here:
git://xenbits.xen.org/people/gdunlap/xen.git out/blktap25/rfc-v1
This series has some niggles (noted in the patches themselves), and so it not yet ready to apply as-is.
One of the big things to note is that blktap.git seems to require autogen to build; at the moment including this patch will increase the build dependencies to include autoconf and libtool. It would be good if we could remove this dependency before a release, if possible.
-George Dunlap
RFC PATCH 1/4 build: Reorganize and briefly document "external repo" template in tools/Makefile
No functional changes.
---
CC: Ian Campbell <[email protected]>
CC: Ian Jackson <[email protected]>
CC: Wei Liu <[email protected]>
CC: Dave Scott <[email protected]>
CC: Jonathan Ludlam <[email protected]>
CC: Wen Congyang <[email protected]>
CC: Yang Hongyang <[email protected]>
--- tools/Makefile | 52 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 8 deletions(-)
tools/Makefile +44 -8
@@ -129,6 +129,41 @@ ifneq ($(QEMU_ROOT),.) export QEMU_ROOT endif +# Targets for external trees: +# ${target}-dir-find +# See if the directory exists and check it out if not. +# ${target}-dir-force-update +# Pull to the most recent update (as if you had checked it out for the +# first time) +# subdir-all-${target}-dir +# Do "make all" for ${target}, including all prerequisites (such as +# configure) +# subdir-install-${target}-dir +# Do "make install" for $TARGET +# subdir-clean-${target}-dir +# Do "make clean" for $TARGET +# +# Directories for external trees: +# ${target}-dir +# Used for local builds. Usually a link to ${target}-dir-remote +# ${target}-dir-remote +# Where remote repositories are cloned +# ${target} +# Where a copy of the source files are put when building a source +# tarball for release +# +# Expected variables: +# ${TARGET}_URL +# A url from which to clone a git repo +# ${TARGET}_REVISION +# The target revision to check out when doing "find" or "force-update" +# ${TARGET}_INTREE +# The directory where the subtree can be found (usually used when building +# a source tarball) +# ${TARGET}_LOC +# The ultimate location of the source (either a local dir or remote URL) + +# External target: qemu-xen-traditional qemu-xen-traditional-dir-find: set -ex; \ if test -d $(QEMU_TRADITIONAL_LOC); then \
@@ -138,14 +173,6 @@ qemu-xen-traditional-dir-find: $(XEN_ROOT)/scripts/git-checkout.sh $(QEMU_TRADITIONAL_LOC) $(QEMU_TRADITIONAL_REVISION) qemu-xen-traditional-dir; \ fi -qemu-xen-dir-find: - if test -d $(QEMU_UPSTREAM_LOC) ; then \ - mkdir -p qemu-xen-dir; \ - else \ - export GIT=$(GIT); \ - $(XEN_ROOT)/scripts/git-checkout.sh $(QEMU_UPSTREAM_LOC) $(QEMU_UPSTREAM_REVISION) qemu-xen-dir ; \ - fi - .PHONY: qemu-xen-traditional-dir-force-update qemu-xen-traditional-dir-force-update: qemu-xen-traditional-dir-find set -ex; \
@@ -183,6 +210,15 @@ subdir-clean-qemu-xen-traditional-dir: $(MAKE) -C qemu-xen-traditional-dir clean; \ fi +# External target: qemu-xen +qemu-xen-dir-find: + if test -d $(QEMU_UPSTREAM_LOC) ; then \ + mkdir -p qemu-xen-dir; \ + else \ + export GIT=$(GIT); \ + $(XEN_ROOT)/scripts/git-checkout.sh $(QEMU_UPSTREAM_LOC) $(QEMU_UPSTREAM_REVISION) qemu-xen-dir ; \ + fi + .PHONY: qemu-xen-dir-force-update qemu-xen-dir-force-update: qemu-xen-dir-find set -ex; \
Signature · 1 line
1.9.1
Re: [PATCH RFC 1/4] build: Reorganize and briefly document "external repo" template in tools/Makefile
Quoted 3 lines · George Dunlap
No functional changes.
Signed-off-by George Dunlap <[email protected]>
Although the series as a whole is RFC I can't see any reason to hold back on this particular improvement, so Acked + applied.
RFC PATCH 2/4 build: Download and build extnernal blktap2.5 repo
In reply to George DunlapDownload and build XenServer's blktap as an external tree, similar to qemu-xen.
As of this patch we just download and build it, but don't install or use it.
---
FIXME: Directly use the XenServer github repo for now, while we're discussing things. If we decide to take this series, we'll have to clone the tree on xenbits and remove the FIXME line.
--- .gitignore | 3 +++ Config.mk | 9 +++++++++ tools/Makefile | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ tools/misc/mktarball | 2 ++ 4 files changed, 63 insertions(+)
.gitignore +3 -0
@@ -261,6 +261,9 @@ tools/qemu-xen-dir tools/qemu-xen-traditional-dir-remote tools/qemu-xen-traditional-dir +tools/blktap-dir-remote +tools/blktap-dir + tools/firmware/seabios-dir-remote tools/firmware/seabios-dir
Config.mk +9 -0
@@ -224,6 +224,7 @@ XEN_EXTFILES_URL ?= http://xenbits.xen.org/xen-extfiles # Where to look for inlined subtrees (for example, from a tarball) QEMU_UPSTREAM_INTREE ?= $(XEN_ROOT)/tools/qemu-xen QEMU_TRADITIONAL_INTREE ?= $(XEN_ROOT)/tools/qemu-xen-traditional +BLKTAP_UPSTREAM_INTREE ?= $(XEN_ROOT)/tools/blktap # Handle legacy options
@@ -240,19 +241,24 @@ ifneq (,$(QEMU_TAG)) QEMU_TRADITIONAL_REVISION ?= $(QEMU_TAG) endif +# FIXME +BLKTAP_UPSTREAM_URL ?= https://github.com/xapi-project/blktap.git ifeq ($(GIT_HTTP),y) OVMF_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/ovmf.git QEMU_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/qemu-upstream-unstable.git QEMU_TRADITIONAL_URL ?= http://xenbits.xen.org/git-http/qemu-xen-unstable.git SEABIOS_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/seabios.git MINIOS_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/mini-os.git +BLKTAP_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/blktap.git else OVMF_UPSTREAM_URL ?= git://xenbits.xen.org/ovmf.git QEMU_UPSTREAM_URL ?= git://xenbits.xen.org/qemu-upstream-unstable.git QEMU_TRADITIONAL_URL ?= git://xenbits.xen.org/qemu-xen-unstable.git SEABIOS_UPSTREAM_URL ?= git://xenbits.xen.org/seabios.git MINIOS_UPSTREAM_URL ?= git://xenbits.xen.org/mini-os.git +BLKTAP_UPSTREAM_URL ?= git://xenbits.xen.org/blktap.git endif +BLKTAP_UPSTREAM_REVISION ?= d73c74874a449c18dc1528076e5c0671cc5ed409 OVMF_UPSTREAM_REVISION ?= a065efc7c7ce8bb3e5cb3e463099d023d4a92927 QEMU_UPSTREAM_REVISION ?= master MINIOS_UPSTREAM_REVISION ?= edfd5aae6ec5ba7d0a8834a3e9dfe5e69424150a
@@ -281,6 +287,9 @@ QEMU_TRADITIONAL_LOC ?= $(call or,$(wildcard $(QEMU_TRADITIONAL_INTREE)),\ QEMU_UPSTREAM_LOC ?= $(call or,$(wildcard $(QEMU_UPSTREAM_INTREE)),\ $(QEMU_UPSTREAM_URL)) +BLKTAP_UPSTREAM_LOC ?= $(call or,$(wildcard $(BLKTAP_UPSTREAM_INTREE)),\ + $(BLKTAP_UPSTREAM_URL)) + # Short answer -- do not enable this unless you know what you are # doing and are prepared for some pain.
tools/Makefile +49 -0
76 lines not on this page · raw message
tools/misc/mktarball +2 -0
@@ -33,6 +33,8 @@ git_archive_into $xen_root/tools/qemu-xen-dir-remote $tdir/xen-$desc/tools/qemu- git_archive_into $xen_root/tools/qemu-xen-traditional-dir-remote $tdir/xen-$desc/tools/qemu-xen-traditional +git_archive_into $xen_root/tools/blktap-dir-remote $tdir/xen-$desc/tools/blktap + git_archive_into $xen_root/extras/mini-os-remote $tdir/xen-$desc/extras/mini-os GZIP=-9v tar cz -f $xen_root/dist/xen-$desc.tar.gz -C $tdir xen-$desc
Signature · 1 line
1.9.1
Re: [PATCH RFC 2/4] build: Download and build extnernal blktap2.5 repo
On Thu, 2015-03-26 at 12:46 +0000, George Dunlap wrote:
Typo in $subject.
Quoted 3 lines
FIXME: Directly use the XenServer github repo for now, while we're discussing things. If we decide to take this series, we'll have to clone the tree on xenbits and remove the FIXME line.
We would also need to decide whether to have a push gate or not (I think we should) and whether to track a branch automatically or manually update the revision (I don't know, depends). Either way I think osstest needs to learn a bit about blktap2.
Overall I'm in favour of the general idea of this change though.
Ian.
Re: [PATCH RFC 2/4] build: Download and build extnernal blktap2.5 repo
Quoted 11 lines · Ian Campbell
On Thu, 2015-03-26 at 12:46 +0000, George Dunlap wrote:
Typo in $subject.
Quoted 3 lines
FIXME: Directly use the XenServer github repo for now, while we're discussing things. If we decide to take this series, we'll have to clone the tree on xenbits and remove the FIXME line.
We would also need to decide whether to have a push gate or not (I think we should) and whether to track a branch automatically or manually update the revision (I don't know, depends).
I think ideally we'd track the "blktap2" branch during normal development, and grab a specific commit ID when we go into feature freeze. But at the moment, that only works if I put "origin/blktap2" in the REVISION, which doesn't seem quite right. On my to-do list is making the git checkout capable of looking for remote branches. (AFAICT "master" works because a local branch called "master" is made by default on checkout.)
-George
Re: [PATCH RFC 2/4] build: Download and build extnernal blktap2.5 repo
In reply to George DunlapQuoted 6 lines · George Dunlap
Download and build XenServer's blktap as an external tree, similar to qemu-xen.
As of this patch we just download and build it, but don't install or use it.
Quoted 7 lines
Signed-off-by George Dunlap <[email protected]>---
FIXME: Directly use the XenServer github repo for now, while we're discussing things. If we decide to take this series, we'll have to clone the tree on xenbits and remove the FIXME line.
IMHO we need to support --with-system-blktap= in configure in case distro wants to package blktap separately. Not sure if in practice this makes sense since AIUI blktap is only used by Xen.
Wei.
Re: [PATCH RFC 2/4] build: Download and build extnernal blktap2.5 repo
Quoted 10 lines · Wei Liu
Quoted 9 lines · George Dunlap
Download and build XenServer's blktap as an external tree, similar to qemu-xen.
As of this patch we just download and build it, but don't install or use it.
Signed-off-by George Dunlap <[email protected]>---
Quoted 8 lines
Quoted 4 lines
FIXME: Directly use the XenServer github repo for now, while we're discussing things. If we decide to take this series, we'll have to clone the tree on xenbits and remove the FIXME line.
IMHO we need to support --with-system-blktap= in configure in case distro wants to package blktap separately. Not sure if in practice this makes sense since AIUI blktap is only used by Xen.
I think you are right, there are at least some distros which ship a blktap package not from Xen. e.g. Debian ship, or have in the past shipped, the blktap2.5 packages.
blktap is a bit different to some of the other similar cases though in that there is a circular dependency, although George indicated last week that he thought that might be an easily fixed one.
Ian.
Re: [PATCH RFC 2/4] build: Download and build extnernal blktap2.5 repo
Quoted 16 lines · Ian Campbell
Quoted 15 lines · Wei Liu
Quoted 13 lines · George Dunlap
Download and build XenServer's blktap as an external tree, similar to qemu-xen.
As of this patch we just download and build it, but don't install or use it.
Signed-off-by George Dunlap <[email protected]>---
FIXME: Directly use the XenServer github repo for now, while we're discussing things. If we decide to take this series, we'll have to clone the tree on xenbits and remove the FIXME line.
Quoted 7 lines
Quoted 3 lines
IMHO we need to support --with-system-blktap= in configure in case distro wants to package blktap separately. Not sure if in practice this makes sense since AIUI blktap is only used by Xen.
I think you are right, there are at least some distros which ship a blktap package not from Xen. e.g. Debian ship, or have in the past shipped, the blktap2.5 packages.
Bob has said that Fedora ship a blktap2.5 package that can't actually be installed at the same time as the Fedora xen packages, making it somewhat useless...
Quoted 3 lines
blktap is a bit different to some of the other similar cases though in that there is a circular dependency, although George indicated last week that he thought that might be an easily fixed one.
I suspect this has probably already been fixed in blktap2.5, since (I'm pretty sure) XenServer ship blktap and the things that depend on it (like xen and xapi) in separate rpms; but it's certainly something we'd have to look at.
-George
Re: [PATCH RFC 2/4] build: Download and build extnernal blktap2.5 repo
In reply to Ian CampbellQuoted 18 lines · Ian Campbell
Quoted 10 lines · Wei Liu
Quoted 9 lines · George Dunlap
Download and build XenServer's blktap as an external tree, similar to qemu-xen.
As of this patch we just download and build it, but don't install or use it.
Signed-off-by George Dunlap <[email protected]>---
Quoted 7 lines
Quoted 4 lines
FIXME: Directly use the XenServer github repo for now, while we're discussing things. If we decide to take this series, we'll have to clone the tree on xenbits and remove the FIXME line.
IMHO we need to support --with-system-blktap= in configure in case distro wants to package blktap separately. Not sure if in practice this makes sense since AIUI blktap is only used by Xen.
Quoted 7 lines
I think you are right, there are at least some distros which ship a blktap package not from Xen. e.g. Debian ship, or have in the past shipped, the blktap2.5 packages.
blktap is a bit different to some of the other similar cases though in that there is a circular dependency, although George indicated last week that he thought that might be an easily fixed one.
I seem to recall that some bits of blktap need xen-devel (depending on exactly what is built).
libxl will need blktap-devel, so these dependences can be resolved.
~Andrew
Re: [PATCH RFC 2/4] build: Download and build extnernal blktap2.5 repo
In reply to Wei LiuQuoted 10 lines · Wei Liu
Quoted 9 lines · George Dunlap
Download and build XenServer's blktap as an external tree, similar to qemu-xen.
As of this patch we just download and build it, but don't install or use it.
Signed-off-by George Dunlap <[email protected]>---
Quoted 8 lines
Quoted 4 lines
FIXME: Directly use the XenServer github repo for now, while we're discussing things. If we decide to take this series, we'll have to clone the tree on xenbits and remove the FIXME line.
IMHO we need to support --with-system-blktap= in configure in case distro wants to package blktap separately. Not sure if in practice this makes sense since AIUI blktap is only used by Xen.
I agree that would be ideal; however, it's not so simple, because at the moment libxl links directly against libblktap. This would mean:
1) Changing libxl so that it could dynamically detect the presence of the proper version of libblktap at runtime and use the stubbed-out defaults if not available.
2) Changing libxl to exec() tapctl rather than making library calls. (This might involve making sure that tapctl actually has all the functionality we need.)
#1 is even more difficult because at the moment blktap isn't really designed to have stable external versions -- it would involve adding a library version and all the fun stuff we already do with libxl.
#2 has another potential advantage: using the command-line may make it easier to be forward-compatible, since adding options won't break (unlike adding arguments to a function signature).
(Although, I think for API compatibility, changing the public functions to use structs is probably a more reliable thing to do.)
Either way, I think that's something we should start to look at after pivoting to the external blktap repo.
-George
Re: [PATCH RFC 2/4] build: Download and build extnernal blktap2.5 repo
Quoted 20 lines · George Dunlap
Quoted 10 lines · Wei Liu
Quoted 9 lines · George Dunlap
Download and build XenServer's blktap as an external tree, similar to qemu-xen.
As of this patch we just download and build it, but don't install or use it.
Signed-off-by George Dunlap <[email protected]>---
Quoted 8 lines
Quoted 4 lines
FIXME: Directly use the XenServer github repo for now, while we're discussing things. If we decide to take this series, we'll have to clone the tree on xenbits and remove the FIXME line.
IMHO we need to support --with-system-blktap= in configure in case distro wants to package blktap separately. Not sure if in practice this makes sense since AIUI blktap is only used by Xen.
Quoted 7 lines
I agree that would be ideal; however, it's not so simple, because at the moment libxl links directly against libblktap. This would mean:
1) Changing libxl so that it could dynamically detect the presence of the proper version of libblktap at runtime and use the stubbed-out defaults if not available.
This should be done in ./configure too, not during libxl build / runtime. If libblktap is not present during ./configure then libxl just use stubs.
Quoted 4 lines
2) Changing libxl to
exec()tapctl rather than making library calls. (This might involve making sure that tapctl actually has all the functionality we need.)
There is no need to change to exec() at runtime. See above.
Quoted 4 lines
#1 is even more difficult because at the moment blktap isn't really designed to have stable external versions -- it would involve adding a library version and all the fun stuff we already do with libxl.
It blktap is to be maintained as external project to get wider usage outside of Xen then this is a thing they have to do, isn't it? Otherwise this is just an effort to separate blktap to an external tree, Xen is still coupled with a certain blktap changeset. Not saying this itself is a problem but it would be better to clarify what's the future expectation of blktap as a project.
Quoted 10 lines
#2 has another potential advantage: using the command-line may make it easier to be forward-compatible, since adding options won't break (unlike adding arguments to a function signature).
(Although, I think for API compatibility, changing the public functions to use structs is probably a more reliable thing to do.)
Either way, I think that's something we should start to look at after pivoting to the external blktap repo.
Agreed. I don't mean to have --with-system-blktap= as prerequisite of this series being accepted.
Wei.
Quoted 1 line
-George
Re: [PATCH RFC 2/4] build: Download and build extnernal blktap2.5 repo
Quoted 7 lines · Wei Liu
Quoted 7 lines
Quoted 3 lines
IMHO we need to support --with-system-blktap= in configure in case distro wants to package blktap separately. Not sure if in practice this makes sense since AIUI blktap is only used by Xen.
I agree that would be ideal; however, it's not so simple, because at the moment libxl links directly against libblktap. This would mean:
Quoted 8 lines
Quoted 4 lines
1) Changing libxl so that it could dynamically detect the presence of the proper version of libblktap at runtime and use the stubbed-out defaults if not available.
This should be done in ./configure too, not during libxl build / runtime. If libblktap is not present during ./configure then libxl just use stubs.
It sounds like you're talking about introducing a hard dependency, such that packages that use a libxl built this way won't function without blktap installed. Yeah, that's simple enough.
I'm not super experienced in the distro packaging mindset, but since (AFAIK) no other programs or projects use blktap, is there much point to having a separate repo if you can't "opt-out" of installing it?
Quoted 11 lines
Quoted 4 lines
#1 is even more difficult because at the moment blktap isn't really designed to have stable external versions -- it would involve adding a library version and all the fun stuff we already do with libxl.
It blktap is to be maintained as external project to get wider usage outside of Xen then this is a thing they have to do, isn't it? Otherwise this is just an effort to separate blktap to an external tree, Xen is still coupled with a certain blktap changeset. Not saying this itself is a problem but it would be better to clarify what's the future expectation of blktap as a project.
My understanding was:
1. The XenServer team develop and maintain blktap primarily for their own product.
2. They don't have a particular desire for blktap to get wider usage. It's actually other projects -- CentOS and COLO in particular -- that want to be able to use a maintained version of blktap.
3. The XenServer developers are, as individuals, happy to have other people using it; and are willing to make small amounts of efforts to be an "upstream" -- namely, accepting bug fixes and reviewing minor contributions.
4. However, the XenServer team is primarily focused on building their own product. They won't be able to spend a significant amount of time making blktap more "community-friendly". Adding features that are useful to other downstreams but not to XenServer will probably be accepted, but I wouldn't be surprised if large architectural changes which help downstreams (such as COLO) but don't have any benefit for XenServer were rejected.
I figured it was worth giving it a try. If things don't work out, then we can either fork (if someone is willing to maintain it), or remove blktap support entirely.
-George
Re: [PATCH RFC 2/4] build: Download and build extnernal blktap2.5 repo
Quoted 17 lines · George Dunlap
Quoted 7 lines · Wei Liu
Quoted 7 lines
Quoted 3 lines
IMHO we need to support --with-system-blktap= in configure in case distro wants to package blktap separately. Not sure if in practice this makes sense since AIUI blktap is only used by Xen.
I agree that would be ideal; however, it's not so simple, because at the moment libxl links directly against libblktap. This would mean:
Quoted 8 lines
Quoted 4 lines
1) Changing libxl so that it could dynamically detect the presence of the proper version of libblktap at runtime and use the stubbed-out defaults if not available.
This should be done in ./configure too, not during libxl build / runtime. If libblktap is not present during ./configure then libxl just use stubs.
Quoted 7 lines
It sounds like you're talking about introducing a hard dependency, such that packages that use a libxl built this way won't function without blktap installed. Yeah, that's simple enough.
I'm not super experienced in the distro packaging mindset, but since (AFAIK) no other programs or projects use blktap, is there much point to having a separate repo if you can't "opt-out" of installing it?
It is not an hard dependency: as long as one doesn't use VHDs, ones doesn't see any difference whether blktap is installed on not.
Quoted 26 lines
Quoted 11 lines
Quoted 4 lines
#1 is even more difficult because at the moment blktap isn't really designed to have stable external versions -- it would involve adding a library version and all the fun stuff we already do with libxl.
It blktap is to be maintained as external project to get wider usage outside of Xen then this is a thing they have to do, isn't it? Otherwise this is just an effort to separate blktap to an external tree, Xen is still coupled with a certain blktap changeset. Not saying this itself is a problem but it would be better to clarify what's the future expectation of blktap as a project.
My understanding was:
1. The XenServer team develop and maintain blktap primarily for their own product.
2. They don't have a particular desire for blktap to get wider usage. It's actually other projects -- CentOS and COLO in particular -- that want to be able to use a maintained version of blktap.
3. The XenServer developers are, as individuals, happy to have other people using it; and are willing to make small amounts of efforts to be an "upstream" -- namely, accepting bug fixes and reviewing minor contributions.
Quoted 7 lines
4. However, the XenServer team is primarily focused on building their own product. They won't be able to spend a significant amount of time making blktap more "community-friendly". Adding features that are useful to other downstreams but not to XenServer will probably be accepted, but I wouldn't be surprised if large architectural changes which help downstreams (such as COLO) but don't have any benefit for XenServer were rejected.
In that case we should probably not have blktap in the xen-unstable tree, because we wouldn't want to have so divergent community models for different component in the same source repository.
However we could make it easier to built libxl and blktap together, we could also add blktap to OSSTest and Raisin
(http://marc.info/?l=xen-devel&m=142779794216955).
Quoted 3 lines
I figured it was worth giving it a try. If things don't work out, then we can either fork (if someone is willing to maintain it), or remove blktap support entirely.
Re: [PATCH RFC 2/4] build: Download and build extnernal blktap2.5 repo
Quoted 22 lines · Stefano Stabellini
Quoted 21 lines · George Dunlap
Quoted 7 lines · Wei Liu
Quoted 7 lines
Quoted 3 lines
IMHO we need to support --with-system-blktap= in configure in case distro wants to package blktap separately. Not sure if in practice this makes sense since AIUI blktap is only used by Xen.
I agree that would be ideal; however, it's not so simple, because at the moment libxl links directly against libblktap. This would mean:
Quoted 8 lines
Quoted 4 lines
1) Changing libxl so that it could dynamically detect the presence of the proper version of libblktap at runtime and use the stubbed-out defaults if not available.
This should be done in ./configure too, not during libxl build / runtime. If libblktap is not present during ./configure then libxl just use stubs.
It sounds like you're talking about introducing a hard dependency, such that packages that use a libxl built this way won't function without blktap installed. Yeah, that's simple enough.
Quoted 6 lines
Quoted 3 lines
I'm not super experienced in the distro packaging mindset, but since (AFAIK) no other programs or projects use blktap, is there much point to having a separate repo if you can't "opt-out" of installing it?
It is not an hard dependency: as long as one doesn't use VHDs, ones doesn't see any difference whether blktap is installed on not.
I'm talking about a hard dependency *for the resulting package*.
If libxl built linked against libblktap, and libblktap is not installed on the system, then won't running the binary at all result in "Can't find shared library" errors?
In any case, I'm pretty sure that if you build an RPM and link against a particular library, that the RPM will then refuse to install if that library isn't available.
Quoted 3 lines
In that case we should probably not have blktap in the xen-unstable tree, because we wouldn't want to have so divergent community models for different component in the same source repository.
Community model doesn't matter to me; what matters to me is the practical question of whether we can upstream what we need to upstream.
An upstream that was in theory open but in practice difficult to work
with or hostile to our patches would be a lot worse than an upstream that was in theory closed but in practice cooperative and took everything we sent them.
I don't expect there to be any major changes required upstream, and so I think that in practice this won't be an issue. If it ever does become an issue, then we can decide what to do about it at that time.
The reason I put it so strongly is that I want to make sure that there are no hard feelings if we end up having to go separate ways. The XenServer team are doing us a favor, and haven't promised a large amount of development time or commitment. I think what they're willing to offer will be sufficient for what we need.
Quoted 3 lines
However we could make it easier to built libxl and blktap together, we could also add blktap to OSSTest and Raisin
(http://marc.info/?l=xen-devel&m=142779794216955).
I wouldn't mind moving all external repos (qemu-*, seabios, ovmf, blktap, &c) out of the Xen tree as soon as Raisin is mature enough to do so.
-George
Re: [PATCH RFC 2/4] build: Download and build extnernal blktap2.5 repo
Quoted 6 lines · George Dunlap
Quoted 3 lines
However we could make it easier to built libxl and blktap together, we could also add blktap to OSSTest and Raisin
(http://marc.info/?l=xen-devel&m=142779794216955).I wouldn't mind moving all external repos (qemu-*, seabios, ovmf, blktap, &c) out of the Xen tree as soon as Raisin is mature enough to do so.
Given the intertwining of blktap2 with libxl etc making it a cloned-by-xen.git tree instead of in-xen.git might be a convenient first step? The raisin development would then proceed using the --with-system-blktap option and eventually the in tree stuff could be dropped.
Ian.
Re: [PATCH RFC 2/4] build: Download and build extnernal blktap2.5 repo
In reply to George DunlapQuoted 32 lines · George Dunlap
Quoted 22 lines · Stefano Stabellini
Quoted 21 lines · George Dunlap
Quoted 7 lines · Wei Liu
Quoted 7 lines
Quoted 3 lines
IMHO we need to support --with-system-blktap= in configure in case distro wants to package blktap separately. Not sure if in practice this makes sense since AIUI blktap is only used by Xen.
I agree that would be ideal; however, it's not so simple, because at the moment libxl links directly against libblktap. This would mean:
Quoted 8 lines
Quoted 4 lines
1) Changing libxl so that it could dynamically detect the presence of the proper version of libblktap at runtime and use the stubbed-out defaults if not available.
This should be done in ./configure too, not during libxl build / runtime. If libblktap is not present during ./configure then libxl just use stubs.
It sounds like you're talking about introducing a hard dependency, such that packages that use a libxl built this way won't function without blktap installed. Yeah, that's simple enough.
Quoted 6 lines
Quoted 3 lines
I'm not super experienced in the distro packaging mindset, but since (AFAIK) no other programs or projects use blktap, is there much point to having a separate repo if you can't "opt-out" of installing it?
It is not an hard dependency: as long as one doesn't use VHDs, ones doesn't see any difference whether blktap is installed on not.
I'm talking about a hard dependency *for the resulting package*.
Quoted 7 lines
If libxl built linked against libblktap, and libblktap is not installed on the system, then won't running the binary at all result in "Can't find shared library" errors?
In any case, I'm pretty sure that if you build an RPM and link against a particular library, that the RPM will then refuse to install if that library isn't available.
Correct (for Debian too), but this is more about the RPM maintainers freedom to choose to enable it or not. Once they chosen their users will just end up with whatever they chose.
For arch and gentoo folks I suppose this would be a USE var or whatever they call it.
Ian.
RFC PATCH 3/4 libxl: Use XenServer's blktap2.5
In reply to George DunlapSwitch to installing blktap2.5 and not building or installing in-tree blktap2.
Port libxl to run on the newest blktap2.5.
tap_ctl_find() has gone away, so in some cases we use tap_ctl_find_minor(), and in other cases we use a locally-reimplemented version of tap_ctl_find().
tap_ctl_create() has an extra three parameters, including a flags parameter which can be used to designate a disk image as read-only. Pass the readwrite disk flag here so we can now open backends on read-only storage.
tap_ctl_destroy() now has two extra arguments as well; add sensible default values.
---
NOTE: I'm pretty sure this won't build from a source tarball at the moment, since XEN_BLKTAP2 is set to tools/blktap-dir, which (IIRC) will be just an empty directory if tools/bltkap exists. (And tools/blktap is where the release tarball script will put the blktap subdir.)
If this gets traction, I'll figure out how to do fix that before I send a non-RFC series.
--- tools/Makefile | 7 ++---- tools/Rules.mk | 8 +++--- tools/libxl/libxl.c | 6 +++-- tools/libxl/libxl_blktap2.c | 58 ++++++++++++++++++++++++++++++++++++-------- tools/libxl/libxl_dm.c | 3 ++- tools/libxl/libxl_internal.h | 3 ++- 6 files changed, 62 insertions(+), 23 deletions(-)
tools/Makefile +2 -5
@@ -16,7 +16,6 @@ SUBDIRS-y += console SUBDIRS-y += xenmon SUBDIRS-y += xenstat SUBDIRS-$(CONFIG_Linux) += memshr -SUBDIRS-$(CONFIG_BLKTAP2) += blktap2 SUBDIRS-$(CONFIG_NetBSD) += xenbackendd SUBDIRS-y += libfsimage SUBDIRS-$(CONFIG_Linux) += libvchan
@@ -309,11 +308,9 @@ subdir-all-blktap-dir: blktap-dir-find --libexecdir=$(LIBEXEC) ; \ $(MAKE) all -# Don't install upstream blktap for now. subdir-install-blktap-dir: subdir-all-blktap-dir - if false ; do cd blktap-dir; \ - $(MAKE) install \ - fi + cd blktap-dir; \ + $(MAKE) install subdir-clean-blktap-dir: set -e; if test -d blktap-dir/.; then \
tools/Rules.mk +4 -4
@@ -14,7 +14,7 @@ XEN_LIBXC = $(XEN_ROOT)/tools/libxc XEN_XENLIGHT = $(XEN_ROOT)/tools/libxl XEN_XENSTORE = $(XEN_ROOT)/tools/xenstore XEN_LIBXENSTAT = $(XEN_ROOT)/tools/xenstat/libxenstat/src -XEN_BLKTAP2 = $(XEN_ROOT)/tools/blktap2 +XEN_BLKTAP2 = $(XEN_ROOT)/tools/blktap-dir XEN_LIBVCHAN = $(XEN_ROOT)/tools/libvchan CFLAGS_xeninclude = -I$(XEN_INCLUDE)
@@ -64,9 +64,9 @@ endif LIBXL_BLKTAP ?= $(CONFIG_BLKTAP2) ifeq ($(LIBXL_BLKTAP),y) -CFLAGS_libblktapctl = -I$(XEN_BLKTAP2)/control -I$(XEN_BLKTAP2)/include $(CFLAGS_xeninclude) -LDLIBS_libblktapctl = -L$(XEN_BLKTAP2)/control -lblktapctl -SHLIB_libblktapctl = -Wl,-rpath-link=$(XEN_BLKTAP2)/control +CFLAGS_libblktapctl = -I$(XEN_BLKTAP2)/include $(CFLAGS_xeninclude) +LDLIBS_libblktapctl = -L$(XEN_BLKTAP2)/control/.libs -lblktapctl +SHLIB_libblktapctl = -Wl,-rpath-link=$(XEN_BLKTAP2)/control/.libs else CFLAGS_libblktapctl = LDLIBS_libblktapctl =
tools/libxl/libxl.c +4 -2
@@ -2437,7 +2437,8 @@ static void device_disk_add(libxl__egc *egc, uint32_t domid,case LIBXL_DISK_BACKEND_TAP :if (dev ==NULL ) { dev =libxl__blktap_devpath (gc, disk->pdev_path, - disk->format); + disk->format, + disk->readwrite);if (!dev) {LOG (ERROR ,"failed to get blktap devpath for %p\n" , disk->pdev_path);
@@ -3031,7 +3032,8 @@ void libxl__device_disk_local_initiate_attach(libxl__egc *egc,break ;case LIBXL_DISK_FORMAT_VHD : dev =libxl__blktap_devpath (gc, disk->pdev_path, - disk->format); + disk->format, + disk->readwrite);break ;case LIBXL_DISK_FORMAT_QCOW :case LIBXL_DISK_FORMAT_QCOW2 :
tools/libxl/libxl_blktap2.c +48 -10
100 lines not on this page · raw message
tools/libxl/libxl_dm.c +2 -1
@@ -826,7 +826,8 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,if (disks[i].backend ==LIBXL_DISK_BACKEND_TAP ) { format =qemu_disk_format_string (LIBXL_DISK_FORMAT_RAW ); pdev_path =libxl__blktap_devpath (gc, disks[i].pdev_path, - disks[i].format); + disks[i].format, + disks[i].readwrite); }else { pdev_path = disks[i].pdev_path; }
tools/libxl/libxl_internal.h +2 -1
@@ -1550,7 +1550,8 @@ _hidden int libxl__blktap_enabled(libxl__gc *gc);*/ _hidden char *libxl__blktap_devpath(libxl__gc *gc,const char *disk, -libxl_disk_format format); +libxl_disk_format format, +int readwrite);/* libxl__device_destroy_tapdisk: * Destroys any tapdisk process associated with the backend represented
Signature · 1 line
1.9.1
RFC PATCH 4/4 tools: Remove in-tree blktap2
In reply to George DunlapThis patch is pure removal; the switch to using upstream blktap happened in a previous patch.
---
CC: Ian Campbell <[email protected]>
CC: Ian Jackson <[email protected]>
CC: Wei Liu <[email protected]>
CC: Dave Scott <[email protected]>
CC: Jonathan Ludlam <[email protected]>
CC: Wen Congyang <[email protected]>
CC: Yang Hongyang <[email protected]>
--- tools/blktap2/Makefile | 20 - tools/blktap2/README | 321 --- tools/blktap2/control/Makefile | 80 - tools/blktap2/control/tap-ctl-allocate.c | 242 -- tools/blktap2/control/tap-ctl-attach.c | 61 - tools/blktap2/control/tap-ctl-check.c | 79 - tools/blktap2/control/tap-ctl-close.c | 87 - tools/blktap2/control/tap-ctl-create.c | 67 - tools/blktap2/control/tap-ctl-destroy.c | 56 - tools/blktap2/control/tap-ctl-detach.c | 61 - tools/blktap2/control/tap-ctl-free.c | 54 - tools/blktap2/control/tap-ctl-ipc.c | 249 --- tools/blktap2/control/tap-ctl-list.c | 536 ----- tools/blktap2/control/tap-ctl-major.c | 69 - tools/blktap2/control/tap-ctl-open.c | 75 - tools/blktap2/control/tap-ctl-pause.c | 59 - tools/blktap2/control/tap-ctl-spawn.c | 174 -- tools/blktap2/control/tap-ctl-unpause.c | 64 - tools/blktap2/control/tap-ctl.c | 815 ------- tools/blktap2/control/tap-ctl.h | 101 - tools/blktap2/drivers/Makefile | 113 - tools/blktap2/drivers/aes.c | 1319 ----------- tools/blktap2/drivers/aes.h | 28 - tools/blktap2/drivers/atomicio.c | 61 - tools/blktap2/drivers/blk.h | 36 - tools/blktap2/drivers/blk_linux.c | 43 - tools/blktap2/drivers/blk_netbsd.c | 41 - tools/blktap2/drivers/block-aio.c | 258 --- tools/blktap2/drivers/block-cache.c | 787 ------- tools/blktap2/drivers/block-log.c | 665 ------ tools/blktap2/drivers/block-qcow.c | 1501 ------------- tools/blktap2/drivers/block-ram.c | 256 --- tools/blktap2/drivers/block-remus.c | 1733 -------------- tools/blktap2/drivers/block-vhd.c | 2322 ------------------- tools/blktap2/drivers/bswap.h | 179 -- tools/blktap2/drivers/check_gcrypt | 18 - tools/blktap2/drivers/hashtable.c | 279 --- tools/blktap2/drivers/hashtable.h | 204 -- tools/blktap2/drivers/hashtable_itr.c | 195 -- tools/blktap2/drivers/hashtable_itr.h | 96 - tools/blktap2/drivers/hashtable_private.h | 90 - tools/blktap2/drivers/hashtable_utility.c | 71 - tools/blktap2/drivers/hashtable_utility.h | 55 - tools/blktap2/drivers/img2qcow.c | 316 --- tools/blktap2/drivers/io-optimize.c | 671 ------ tools/blktap2/drivers/io-optimize.h | 68 - tools/blktap2/drivers/libaio-compat.h | 104 - tools/blktap2/drivers/lock.c | 1000 --------- tools/blktap2/drivers/lock.h | 51 - tools/blktap2/drivers/log.h | 123 - tools/blktap2/drivers/md5.c | 278 --- tools/blktap2/drivers/md5.h | 15 - tools/blktap2/drivers/profile.h | 191 -- tools/blktap2/drivers/qcow-create.c | 121 - tools/blktap2/drivers/qcow.h | 131 -- tools/blktap2/drivers/qcow2raw.c | 443 ---- tools/blktap2/drivers/scheduler.c | 265 --- tools/blktap2/drivers/scheduler.h | 65 - tools/blktap2/drivers/tapdisk-client.c | 496 ----- tools/blktap2/drivers/tapdisk-control.c | 837 ------- tools/blktap2/drivers/tapdisk-control.h | 35 - tools/blktap2/drivers/tapdisk-diff.c | 802 ------- tools/blktap2/drivers/tapdisk-disktype.c | 204 -- tools/blktap2/drivers/tapdisk-disktype.h | 62 - tools/blktap2/drivers/tapdisk-driver.c | 101 - tools/blktap2/drivers/tapdisk-driver.h | 62 - tools/blktap2/drivers/tapdisk-filter.c | 272 --- tools/blktap2/drivers/tapdisk-filter.h | 67 - tools/blktap2/drivers/tapdisk-image.c | 169 -- tools/blktap2/drivers/tapdisk-image.h | 56 - tools/blktap2/drivers/tapdisk-interface.c | 259 --- tools/blktap2/drivers/tapdisk-interface.h | 54 - tools/blktap2/drivers/tapdisk-log.c | 257 --- tools/blktap2/drivers/tapdisk-log.h | 51 - tools/blktap2/drivers/tapdisk-queue.c | 743 ------ tools/blktap2/drivers/tapdisk-queue.h | 125 -- tools/blktap2/drivers/tapdisk-ring.c | 439 ---- tools/blktap2/drivers/tapdisk-ring.h | 87 - tools/blktap2/drivers/tapdisk-server.c | 345 --- tools/blktap2/drivers/tapdisk-server.h | 67 - tools/blktap2/drivers/tapdisk-stream.c | 605 ----- tools/blktap2/drivers/tapdisk-utils.c | 214 -- tools/blktap2/drivers/tapdisk-utils.h | 45 - tools/blktap2/drivers/tapdisk-vbd.c | 1723 -------------- tools/blktap2/drivers/tapdisk-vbd.h | 207 -- tools/blktap2/drivers/tapdisk.h | 169 -- tools/blktap2/drivers/tapdisk2.c | 138 -- tools/blktap2/drivers/td.c | 691 ------ tools/blktap2/drivers/xmsnap | 78 - tools/blktap2/include/Makefile | 17 - tools/blktap2/include/atomicio.h | 33 - tools/blktap2/include/blktap2.h | 67 - tools/blktap2/include/blktaplib.h | 242 -- tools/blktap2/include/libvhd-journal.h | 68 - tools/blktap2/include/libvhd.h | 326 --- tools/blktap2/include/list.h | 125 -- tools/blktap2/include/lvm-util.h | 71 - tools/blktap2/include/relative-path.h | 43 - tools/blktap2/include/tapdisk-message.h | 203 -- tools/blktap2/include/vhd-util.h | 44 - tools/blktap2/include/vhd-uuid.h | 63 - tools/blktap2/include/vhd.h | 219 -- tools/blktap2/lvm/Makefile | 36 - tools/blktap2/lvm/lvm-util.c | 349 --- tools/blktap2/vhd/Makefile | 51 - tools/blktap2/vhd/lib/Makefile | 82 - tools/blktap2/vhd/lib/atomicio.c | 61 - tools/blktap2/vhd/lib/libvhd-journal.c | 1534 ------------- tools/blktap2/vhd/lib/libvhd.c | 3348 ---------------------------- tools/blktap2/vhd/lib/relative-path.c | 299 --- tools/blktap2/vhd/lib/vhd-util-check.c | 980 -------- tools/blktap2/vhd/lib/vhd-util-coalesce.c | 218 -- tools/blktap2/vhd/lib/vhd-util-create.c | 80 - tools/blktap2/vhd/lib/vhd-util-fill.c | 105 - tools/blktap2/vhd/lib/vhd-util-modify.c | 132 -- tools/blktap2/vhd/lib/vhd-util-query.c | 159 -- tools/blktap2/vhd/lib/vhd-util-read.c | 742 ------ tools/blktap2/vhd/lib/vhd-util-repair.c | 84 - tools/blktap2/vhd/lib/vhd-util-resize.c | 1131 ---------- tools/blktap2/vhd/lib/vhd-util-revert.c | 106 - tools/blktap2/vhd/lib/vhd-util-scan.c | 1317 ----------- tools/blktap2/vhd/lib/vhd-util-set-field.c | 106 - tools/blktap2/vhd/lib/vhd-util-snapshot.c | 216 -- tools/blktap2/vhd/lib/vhd-util-uuid.c | 128 -- tools/blktap2/vhd/vhd-update.c | 259 --- tools/blktap2/vhd/vhd-util.c | 163 -- 126 files changed, 40129 deletions(-) delete mode 100644 tools/blktap2/Makefile delete mode 100644 tools/blktap2/README delete mode 100644 tools/blktap2/control/Makefile delete mode 100644 tools/blktap2/control/tap-ctl-allocate.c delete mode 100644 tools/blktap2/control/tap-ctl-attach.c delete mode 100644 tools/blktap2/control/tap-ctl-check.c delete mode 100644 tools/blktap2/control/tap-ctl-close.c delete mode 100644 tools/blktap2/control/tap-ctl-create.c delete mode 100644 tools/blktap2/control/tap-ctl-destroy.c delete mode 100644 tools/blktap2/control/tap-ctl-detach.c delete mode 100644 tools/blktap2/control/tap-ctl-free.c delete mode 100644 tools/blktap2/control/tap-ctl-ipc.c delete mode 100644 tools/blktap2/control/tap-ctl-list.c delete mode 100644 tools/blktap2/control/tap-ctl-major.c delete mode 100644 tools/blktap2/control/tap-ctl-open.c delete mode 100644 tools/blktap2/control/tap-ctl-pause.c delete mode 100644 tools/blktap2/control/tap-ctl-spawn.c delete mode 100644 tools/blktap2/control/tap-ctl-unpause.c delete mode 100644 tools/blktap2/control/tap-ctl.c delete mode 100644 tools/blktap2/control/tap-ctl.h delete mode 100644 tools/blktap2/drivers/Makefile delete mode 100644 tools/blktap2/drivers/aes.c delete mode 100644 tools/blktap2/drivers/aes.h delete mode 100644 tools/blktap2/drivers/atomicio.c delete mode 100644 tools/blktap2/drivers/blk.h delete mode 100644 tools/blktap2/drivers/blk_linux.c delete mode 100644 tools/blktap2/drivers/blk_netbsd.c delete mode 100644 tools/blktap2/drivers/block-aio.c delete mode 100644 tools/blktap2/drivers/block-cache.c delete mode 100644 tools/blktap2/drivers/block-log.c delete mode 100644 tools/blktap2/drivers/block-qcow.c delete mode 100644 tools/blktap2/drivers/block-ram.c delete mode 100644 tools/blktap2/drivers/block-remus.c delete mode 100644 tools/blktap2/drivers/block-vhd.c delete mode 100644 tools/blktap2/drivers/bswap.h delete mode 100644 tools/blktap2/drivers/check_gcrypt delete mode 100644 tools/blktap2/drivers/hashtable.c delete mode 100644 tools/blktap2/drivers/hashtable.h delete mode 100644 tools/blktap2/drivers/hashtable_itr.c delete mode 100644 tools/blktap2/drivers/hashtable_itr.h delete mode 100644 tools/blktap2/drivers/hashtable_private.h delete mode 100644 tools/blktap2/drivers/hashtable_utility.c delete mode 100644 tools/blktap2/drivers/hashtable_utility.h delete mode 100644 tools/blktap2/drivers/img2qcow.c delete mode 100644 tools/blktap2/drivers/io-optimize.c delete mode 100644 tools/blktap2/drivers/io-optimize.h delete mode 100644 tools/blktap2/drivers/libaio-compat.h delete mode 100644 tools/blktap2/drivers/lock.c delete mode 100644 tools/blktap2/drivers/lock.h delete mode 100644 tools/blktap2/drivers/log.h delete mode 100644 tools/blktap2/drivers/md5.c delete mode 100644 tools/blktap2/drivers/md5.h delete mode 100644 tools/blktap2/drivers/profile.h delete mode 100644 tools/blktap2/drivers/qcow-create.c delete mode 100644 tools/blktap2/drivers/qcow.h delete mode 100644 tools/blktap2/drivers/qcow2raw.c delete mode 100644 tools/blktap2/drivers/scheduler.c delete mode 100644 tools/blktap2/drivers/scheduler.h delete mode 100644 tools/blktap2/drivers/tapdisk-client.c delete mode 100644 tools/blktap2/drivers/tapdisk-control.c delete mode 100644 tools/blktap2/drivers/tapdisk-control.h delete mode 100644 tools/blktap2/drivers/tapdisk-diff.c delete mode 100644 tools/blktap2/drivers/tapdisk-disktype.c delete mode 100644 tools/blktap2/drivers/tapdisk-disktype.h delete mode 100644 tools/blktap2/drivers/tapdisk-driver.c delete mode 100644 tools/blktap2/drivers/tapdisk-driver.h delete mode 100644 tools/blktap2/drivers/tapdisk-filter.c delete mode 100644 tools/blktap2/drivers/tapdisk-filter.h delete mode 100644 tools/blktap2/drivers/tapdisk-image.c delete mode 100644 tools/blktap2/drivers/tapdisk-image.h delete mode 100644 tools/blktap2/drivers/tapdisk-interface.c delete mode 100644 tools/blktap2/drivers/tapdisk-interface.h delete mode 100644 tools/blktap2/drivers/tapdisk-log.c delete mode 100644 tools/blktap2/drivers/tapdisk-log.h delete mode 100644 tools/blktap2/drivers/tapdisk-queue.c delete mode 100644 tools/blktap2/drivers/tapdisk-queue.h delete mode 100644 tools/blktap2/drivers/tapdisk-ring.c delete mode 100644 tools/blktap2/drivers/tapdisk-ring.h delete mode 100644 tools/blktap2/drivers/tapdisk-server.c delete mode 100644 tools/blktap2/drivers/tapdisk-server.h delete mode 100644 tools/blktap2/drivers/tapdisk-stream.c delete mode 100644 tools/blktap2/drivers/tapdisk-utils.c delete mode 100644 tools/blktap2/drivers/tapdisk-utils.h delete mode 100644 tools/blktap2/drivers/tapdisk-vbd.c delete mode 100644 tools/blktap2/drivers/tapdisk-vbd.h delete mode 100644 tools/blktap2/drivers/tapdisk.h delete mode 100644 tools/blktap2/drivers/tapdisk2.c delete mode 100644 tools/blktap2/drivers/td.c delete mode 100644 tools/blktap2/drivers/xmsnap delete mode 100644 tools/blktap2/include/Makefile delete mode 100644 tools/blktap2/include/atomicio.h delete mode 100644 tools/blktap2/include/blktap2.h delete mode 100644 tools/blktap2/include/blktaplib.h delete mode 100644 tools/blktap2/include/libvhd-journal.h delete mode 100644 tools/blktap2/include/libvhd.h delete mode 100644 tools/blktap2/include/list.h delete mode 100644 tools/blktap2/include/lvm-util.h delete mode 100644 tools/blktap2/include/relative-path.h delete mode 100644 tools/blktap2/include/tapdisk-message.h delete mode 100644 tools/blktap2/include/vhd-util.h delete mode 100644 tools/blktap2/include/vhd-uuid.h delete mode 100644 tools/blktap2/include/vhd.h delete mode 100644 tools/blktap2/lvm/Makefile delete mode 100644 tools/blktap2/lvm/lvm-util.c delete mode 100644 tools/blktap2/vhd/Makefile delete mode 100644 tools/blktap2/vhd/lib/Makefile delete mode 100644 tools/blktap2/vhd/lib/atomicio.c delete mode 100644 tools/blktap2/vhd/lib/libvhd-journal.c delete mode 100644 tools/blktap2/vhd/lib/libvhd.c delete mode 100644 tools/blktap2/vhd/lib/relative-path.c delete mode 100644 tools/blktap2/vhd/lib/vhd-util-check.c delete mode 100644 tools/blktap2/vhd/lib/vhd-util-coalesce.c delete mode 100644 tools/blktap2/vhd/lib/vhd-util-create.c delete mode 100644 tools/blktap2/vhd/lib/vhd-util-fill.c delete mode 100644 tools/blktap2/vhd/lib/vhd-util-modify.c delete mode 100644 tools/blktap2/vhd/lib/vhd-util-query.c delete mode 100644 tools/blktap2/vhd/lib/vhd-util-read.c delete mode 100644 tools/blktap2/vhd/lib/vhd-util-repair.c delete mode 100644 tools/blktap2/vhd/lib/vhd-util-resize.c delete mode 100644 tools/blktap2/vhd/lib/vhd-util-revert.c delete mode 100644 tools/blktap2/vhd/lib/vhd-util-scan.c delete mode 100644 tools/blktap2/vhd/lib/vhd-util-set-field.c delete mode 100644 tools/blktap2/vhd/lib/vhd-util-snapshot.c delete mode 100644 tools/blktap2/vhd/lib/vhd-util-uuid.c delete mode 100644 tools/blktap2/vhd/vhd-update.c delete mode 100644 tools/blktap2/vhd/vhd-util.c
[REMOVED]
Quoted 9 lines · George Dunlap
For some time, the blktap2 in-tree has bitrotted. Many years ago the XenServer team at Citrix forked the code into a separate repository; several attempts have been made to upstream those changes back into Xen, to no avail.
The blktap code at the moment is the only source of performant vhd format integration. It's additionally in use by projects like the COLO project.
Quoted 5 lines
This patch series removes the in-tree blktap2 code and treats the XenServer blktap tree as an upstream. I've gotten agreement from the XenServer team to act as an upstream -- to accept patches fixing bugs, to help track down errors, and to attempt to help fix build breakages introduced by development.
That is to say -- I think I remember getting such agreement -- please do contradict me if I'm wrong. :-)
-George
Quoted 15 lines · George Dunlap
For some time, the blktap2 in-tree has bitrotted. Many years ago the XenServer team at Citrix forked the code into a separate repository; several attempts have been made to upstream those changes back into Xen, to no avail.
The blktap code at the moment is the only source of performant vhd format integration. It's additionally in use by projects like the COLO project.
This patch series removes the in-tree blktap2 code and treats the XenServer blktap tree as an upstream. I've gotten agreement from the XenServer team to act as an upstream -- to accept patches fixing bugs, to help track down errors, and to attempt to help fix build breakages introduced by development.
Quoted 5 lines
At the moment we're using the "blktap2" branch of XenServer's blktap.git. (This has been sometimes known as "blktap 2.5".) This branch is maintianed in order to provide a buildroot for OpenStack, and has also been used by the CentOS xen packages for several years now.
It's probably worth mentioning again that there is a kernel patch required. Some years ago I did some work to make the patch into a dkms module, but since then the patch and the kernel have moved on and I couldn't quite make it work any more; I'm afraid my kernel knowledge is a bit lacking.
The current patches used in XenServer are on github here:
https://github.com/xenserver/linux-3.x.pg/tree/master/master
and the old dkms code is here:
https://github.com/xapi-project/blktap-dkms
In case anyone is interested...!
Jon
Quoted 28 lines · Jon Ludlam
Quoted 15 lines · George Dunlap
For some time, the blktap2 in-tree has bitrotted. Many years ago the XenServer team at Citrix forked the code into a separate repository; several attempts have been made to upstream those changes back into Xen, to no avail.
The blktap code at the moment is the only source of performant vhd format integration. It's additionally in use by projects like the COLO project.
This patch series removes the in-tree blktap2 code and treats the XenServer blktap tree as an upstream. I've gotten agreement from the XenServer team to act as an upstream -- to accept patches fixing bugs, to help track down errors, and to attempt to help fix build breakages introduced by development.
Quoted 5 lines
At the moment we're using the "blktap2" branch of XenServer's blktap.git. (This has been sometimes known as "blktap 2.5".) This branch is maintianed in order to provide a buildroot for OpenStack, and has also been used by the CentOS xen packages for several years now.
It's probably worth mentioning again that there is a kernel patch required. Some years ago I did some work to make the patch into a dkms module, but since then the patch and the kernel have moved on and I couldn't quite make it work any more; I'm afraid my kernel knowledge is a bit lacking.
Quoted 7 lines
The current patches used in XenServer are on github here:
https://github.com/xenserver/linux-3.x.pg/tree/master/masterand the old dkms code is here:
https://github.com/xapi-project/blktap-dkmsIn case anyone is interested...!
Another thing I'd like to explore (since this took all of about an afternoon to get working) is what it would take to switch to using blktap3 instead. As I understand from my conversations with the XenServer team, they use a kernel module in XenServer when mounting an image in dom0 for scalability reasons; but there's no reason XenProject need to do the same thing.
I'd probably need some guidance from the XenServer team about an appropriate way to start that. :-)
-George
Quoted 45 lines
-----Original Message-----
From: [email protected] [mailto:xen-devel- [email protected]] On Behalf Of George Dunlap
Sent: 26 March 2015 16:09
To: Jonathan Ludlam
Cc: Wei Liu; Dave Scott; Wen Congyang; Jonathan Ludlam; xen- [email protected]; Ian Jackson; Yang Hongyang; Ian Campbell
Subject: Re: [Xen-devel] [PATCH RFC 0/4] tools: Upstream blktap "2.5" as an external repoQuoted 34 lines · Jon Ludlam
Quoted 15 lines · George Dunlap
For some time, the blktap2 in-tree has bitrotted. Many years ago the XenServer team at Citrix forked the code into a separate repository; several attempts have been made to upstream those changes back into Xen, to no avail.
The blktap code at the moment is the only source of performant vhd format integration. It's additionally in use by projects like the COLO project.
This patch series removes the in-tree blktap2 code and treats the XenServer blktap tree as an upstream. I've gotten agreement from the XenServer team to act as an upstream -- to accept patches fixing bugs, to help track down errors, and to attempt to help fix build breakages introduced by development.
Quoted 5 lines
At the moment we're using the "blktap2" branch of XenServer's blktap.git. (This has been sometimes known as "blktap 2.5".) This branch is maintianed in order to provide a buildroot for OpenStack, and has also been used by the CentOS xen packages for several years now.
It's probably worth mentioning again that there is a kernel patch required. Some years ago I did some work to make the patch into a dkms module, but since then the patch and the kernel have moved on and I couldn't quite make it work any more; I'm afraid my kernel knowledge is a bit lacking.
The current patches used in XenServer are on github here:
https://github.com/xenserver/linux-3.x.pg/tree/master/masterand the old dkms code is here:
https://github.com/xapi-project/blktap-dkms
Quoted 8 lines
Quoted 1 line
In case anyone is interested...!
Another thing I'd like to explore (since this took all of about an afternoon to get working) is what it would take to switch to using
blktap3 instead. As I understand from my conversations with the XenServer team, they use a kernel module in XenServer when mounting an image in dom0 for scalability reasons; but there's no reason XenProject need to do the same thing.
Today, to access virtual disks in dom0 we use the blktap2 kernel module that Jonathan Ludlam mentioned. This provides a block device (in /dev/xen/blktap-2/tapdev<minor>). In the (somewhat distant) past, we actually had blkfront in dom0.
Quoted 2 lines
I'd probably need some guidance from the XenServer team about an appropriate way to start that. :-)
What is also needed to get blktap3 working is a gntdev supporting grant copy. I believe this is the order they are applied in 3.10:
https://github.com/xenserver/linux-3.x.pg/blob/master/master/0001-xen-install-xen-gntdev.h-and-xen-gntalloc.h.patch
https://github.com/xenserver/linux-3.x.pg/blob/master/master/xen-gntdev-grant-copy.patch
https://github.com/xenserver/linux-3.x.pg/blob/master/master/0002-xen-gntdev-mark-userspace-PTEs-as-special-on-x86-PV-.patch
https://github.com/xenserver/linux-3.x.pg/blob/master/master/0003-xen-gntdev-provide-a-set-of-pages-for-the-VMA.patch
The _main_ difference between tapdisk2 and 3 is that tapdisk3 can connect directly to blkfront. It does all I/O via grant copies which has some implications in the way memory is handled in dom0.
Cheers,
Felipe
Quoted 7 lines
-George
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 8 lines · Felipe Franciosi
Quoted 6 lines
Another thing I'd like to explore (since this took all of about an afternoon to get working) is what it would take to switch to using
blktap3 instead. As I understand from my conversations with the XenServer team, they use a kernel module in XenServer when mounting an image in dom0 for scalability reasons; but there's no reason XenProject need to do the same thing.Today, to access virtual disks in dom0 we use the blktap2 kernel module that Jonathan Ludlam mentioned. This provides a block device (in /dev/xen/blktap-2/tapdev<minor>). In the (somewhat distant) past, we actually had blkfront in dom0.
OK -- so the XenServer blktap2 kernel module is definitely being maintained. That's good to know.
Quoted 7 lines
What is also needed to get blktap3 working is a gntdev supporting grant copy. I believe this is the order they are applied in 3.10:
https://github.com/xenserver/linux-3.x.pg/blob/master/master/0001-xen-install-xen-gntdev.h-and-xen-gntalloc.h.patch
https://github.com/xenserver/linux-3.x.pg/blob/master/master/xen-gntdev-grant-copy.patch
https://github.com/xenserver/linux-3.x.pg/blob/master/master/0002-xen-gntdev-mark-userspace-PTEs-as-special-on-x86-PV-.patch
https://github.com/xenserver/linux-3.x.pg/blob/master/master/0003-xen-gntdev-provide-a-set-of-pages-for-the-VMA.patchThe _main_ difference between tapdisk2 and 3 is that tapdisk3 can connect directly to blkfront. It does all I/O via grant copies which has some implications in the way memory is handled in dom0.
Right, I didn't realize blktap3 also required kernel changes. Are those reasonably upstream-able, and is there any plan by the XenServer team to upstream them?
-George
Quoted 17 lines · George Dunlap
Quoted 7 lines · Felipe Franciosi
Quoted 6 lines
Another thing I'd like to explore (since this took all of about an afternoon to get working) is what it would take to switch to using
blktap3 instead. As I understand from my conversations with the XenServer team, they use a kernel module in XenServer when mounting an image in dom0 for scalability reasons; but there's no reason XenProject need to do the same thing.Today, to access virtual disks in dom0 we use the blktap2 kernel module that Jonathan Ludlam mentioned. This provides a block device (in /dev/xen/blktap-2/tapdev<minor>). In the (somewhat distant) past, we actually had blkfront in dom0.
OK -- so the XenServer blktap2 kernel module is definitely being maintained. That's good to know.
Quoted 6 lines
What is also needed to get blktap3 working is a gntdev supporting grant copy. I believe this is the order they are applied in 3.10:
https://github.com/xenserver/linux-3.x.pg/blob/master/master/0001-xen-install-xen-gntdev.h-and-xen-gntalloc.h.patch
https://github.com/xenserver/linux-3.x.pg/blob/master/master/xen-gntdev-grant-copy.patch
https://github.com/xenserver/linux-3.x.pg/blob/master/master/0002-xen-gntdev-mark-userspace-PTEs-as-special-on-x86-PV-.patch
https://github.com/xenserver/linux-3.x.pg/blob/master/master/0003-xen-gntdev-provide-a-set-of-pages-for-the-VMA.patch
Quoted 4 lines
Quoted 1 line
The _main_ difference between tapdisk2 and 3 is that tapdisk3 can connect directly to blkfront. It does all I/O via grant copies which has some implications in the way memory is handled in dom0.
Right, I didn't realize blktap3 also required kernel changes. Are those reasonably upstream-able, and is there any plan by the XenServer team to upstream them?
They are all in Linux 3.19 iirc. These are not patches for blktap3 specially; they are all patches fixing the use of userspace grant maps with /dev/xen/gnttab, which never functioned correctly in the past.
~Andrew
Quoted 33 lines · Andrew Cooper
Quoted 32 lines · George Dunlap
Quoted 10 lines · Felipe Franciosi
Quoted 10 lines
Another thing I'd like to explore (since this took all of about an afternoon to get
working) is what it would take to switch to using
blktap3 instead. As I understand from my conversations with the XenServer
team, they use a kernel module in XenServer when mounting an image in dom0
for scalability reasons; but there's no reason XenProject need to do the same
thing.Quoted 4 lines
Today, to access virtual disks in dom0 we use the blktap2 kernel module that Jonathan Ludlam mentioned. This provides a block device (in /dev/xen/blktap-2/tapdev<minor>). In the (somewhat distant) past, we actually had blkfront in dom0.
OK -- so the XenServer blktap2 kernel module is definitely being maintained. That's good to know.
Quoted 14 lines
What is also needed to get blktap3 working is a gntdev supporting grant copy. I believe this is the order they are applied in 3.10:
https://github.com/xenserver/linux-3.x.pg/blob/master/master/0001-xen-install-xen-gntdev.h-and-xen-gntalloc.h.patchhttps://github.com/xenserver/linux-3.x.pg/blob/master/master/xen-gntdev-grant-copy.patch
The _main_ difference between tapdisk2 and 3 is that tapdisk3 can connect directly to blkfront. It does all I/O via grant copies which has some implications in the way memory is handled in dom0.
Quoted 7 lines
Quoted 3 lines
Right, I didn't realize blktap3 also required kernel changes. Are those reasonably upstream-able, and is there any plan by the XenServer team to upstream them?
They are all in Linux 3.19 iirc. These are not patches for blktap3 specially; they are all patches fixing the use of userspace grant maps with
/dev/xen/gnttab, which never functioned correctly in the past.
OK, good. So with my XenProject hat on, nothing needs to be done per se to use blktap3; we just need to tell people to use linux >= 3.19. (And make sure there's a robust way to detect the necessary kernel support before trying to use blktap3.)
With my CentOS hat on, if I want to use an older version of Linux, I need to import / port those patches to whatever version I'm using; but that's not directly relevant to this discussion.
-George
Quoted 11 lines
-----Original Message-----
From: George Dunlap [mailto:[email protected]]
Sent: 26 March 2015 17:23
To: Andrew Cooper; Felipe Franciosi; George Dunlap; Jonathan Ludlam
Cc: Dave Scott; Wei Liu; Ian Campbell; Wen Congyang; [email protected]; Ian Jackson; Yang Hongyang
Subject: Re: [Xen-devel] [PATCH RFC 0/4] tools: Upstream blktap "2.5" as an external repo
Quoted 42 lines
Quoted 41 lines · Andrew Cooper
Quoted 30 lines · George Dunlap
Quoted 11 lines · Felipe Franciosi
Quoted 7 lines
Another thing I'd like to explore (since this took all of about an afternoon to get
working) is what it would take to switch to using blktap3 instead. As I understand from my conversations with the XenServer team, they use a kernel module in XenServer when mounting an image in dom0 for scalability reasons; but there's no reason XenProject need to do the same thing.Today, to access virtual disks in dom0 we use the blktap2 kernel module that Jonathan Ludlam mentioned. This provides a block device (in /dev/xen/blktap-2/tapdev<minor>). In the (somewhat distant) past, we actually had blkfront in dom0.
OK -- so the XenServer blktap2 kernel module is definitely being maintained. That's good to know.
Quoted 15 lines
What is also needed to get blktap3 working is a gntdev supporting grant copy. I believe this is the order they are applied in 3.10:
https://github.com/xenserver/linux-3.x.pg/blob/master/master/0001-xe
n-install-xen-gntdev.h-and-xen-gntalloc.h.patchhttps://github.com/xenserver/linux-3.x.pg/blob/master/master/xen-gnt
dev-grant-copy.patchhttps://github.com/xenserver/linux-3.x.pg/blob/master/master/0002-xe
n-gntdev-mark-userspace-PTEs-as-special-on-x86-PV-.patchhttps://github.com/xenserver/linux-3.x.pg/blob/master/master/0003-xe
n-gntdev-provide-a-set-of-pages-for-the-VMA.patchQuoted 6 lines
Quoted 3 lines
The _main_ difference between tapdisk2 and 3 is that tapdisk3 can connect directly to blkfront. It does all I/O via grant copies which has some implications in the way memory is handled in dom0.
Right, I didn't realize blktap3 also required kernel changes. Are those reasonably upstream-able, and is there any plan by the XenServer team to upstream them?
They are all in Linux 3.19 iirc. These are not patches for blktap3 specially; they are all patches fixing the use of userspace grant maps with
/dev/xen/gnttab, which never functioned correctly in the past.
I don't think they are all in 3.19. I just had a quick look and our gntdev.c looks very different than upstream's.
The grant-copy patch is definitely missing on Linux 4.0-rc5.
Cheers,
F.
Quoted 11 lines
OK, good. So with my XenProject hat on, nothing needs to be done per se to use blktap3; we just need to tell people to use linux >= 3.19. (And make sure there's a robust way to detect the necessary kernel support before trying to use blktap3.)
With my CentOS hat on, if I want to use an older version of Linux, I need to import / port those patches to whatever version I'm using; but that's not directly relevant to this discussion.
-George
Quoted 44 lines · George Dunlap
Quoted 28 lines · Jon Ludlam
Quoted 15 lines · George Dunlap
For some time, the blktap2 in-tree has bitrotted. Many years ago the XenServer team at Citrix forked the code into a separate repository; several attempts have been made to upstream those changes back into Xen, to no avail.
The blktap code at the moment is the only source of performant vhd format integration. It's additionally in use by projects like the COLO project.
This patch series removes the in-tree blktap2 code and treats the XenServer blktap tree as an upstream. I've gotten agreement from the XenServer team to act as an upstream -- to accept patches fixing bugs, to help track down errors, and to attempt to help fix build breakages introduced by development.
Quoted 5 lines
At the moment we're using the "blktap2" branch of XenServer's blktap.git. (This has been sometimes known as "blktap 2.5".) This branch is maintianed in order to provide a buildroot for OpenStack, and has also been used by the CentOS xen packages for several years now.
It's probably worth mentioning again that there is a kernel patch required. Some years ago I did some work to make the patch into a dkms module, but since then the patch and the kernel have moved on and I couldn't quite make it work any more; I'm afraid my kernel knowledge is a bit lacking.
Quoted 7 lines
The current patches used in XenServer are on github here:
https://github.com/xenserver/linux-3.x.pg/tree/master/masterand the old dkms code is here:
https://github.com/xapi-project/blktap-dkmsIn case anyone is interested...!
Another thing I'd like to explore (since this took all of about an afternoon to get working) is what it would take to switch to using blktap3 instead. As I understand from my conversations with the XenServer team, they use a kernel module in XenServer when mounting an image in dom0 for scalability reasons; but there's no reason XenProject need to do the same thing.
Quoted 3 lines
I'd probably need some guidance from the XenServer team about an appropriate way to start that. :-)
Good question. The right people to speak to are probably Germano and/or Felipe (cc'd)
Jon
Quoted 1 line
-George