blktap: re-enable blktap1 if blktap2 is disabled

This patch re-enables a useful blktap1 for users who disable blktap2.
Itremoves tapdisk and blktapctrl from blktap2, both of which cause
problems with blktap operation.  In addition, this patch modifies xend
to check for blktap2 installation.  If the blktap2 driver isn't
running (hopefully because the dom0 kernel option wasn't selected) we
fall back to blktap.

Signed-off-by: Dutch Meyer <dmeyer@cs.ubc.ca>
This commit is contained in:
Keir Fraser committed 2009-06-18 10:29:58 +01:00
1 parent 6c11039cbd
commit 590b3ce1d3
12 files changed
+15 -2737

No files matched your search

@@ -126,9 +126,19 @@ class BlktapController(BlkifController):
except:
(typ, params, file) = string.split(uname, ':', 2)
subtyp = 'tapdisk'
#check for blktap2 installation.
blktap2_installed=0;
(rc,stdout, stderr) = doexec("cat /proc/devices");
out = stdout.read();
stdout.close();
stderr.close();
if( out.find("blktap2") >= 0 ):
blktap2_installed=1;
if typ in ('tap'):
if subtyp in ('tapdisk'):
if params in ('ioemu', 'qcow2', 'vmdk', 'sync'):
if params in ('ioemu', 'qcow2', 'vmdk', 'sync') or not blktap2_installed:
log.warn('WARNING: using deprecated blktap module');
return BlkifController.createDevice(self, config);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.