libxl: blktap/tapback support
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 4 repliesIn review
- v14 patches 10 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | hotplug: Update block-taptools/ | +157 | 2 replies | |
| 2/3 | libxl: Support blktap with HVM device modeltools/ tools/ | +14 | 1 reply | |
| 3/3 | CHANGELOG: Mention libxl blktap/tapback supportCHANGELOG.md | +1 | 1 reply |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Anthony PERARD | Oleksii Kurochko |
|---|---|---|
| 1/3 | R-b | |
| 2/3 | R-b | |
| 3/3 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/3] libxl: blktap/tapback support
From: Jason Andryuk <[email protected]>
This patch set re-introduces blktap support to libxl. Unlike earlier versions, it does not link against any blktap library. libxl changes are needed to write to the vbd3 backend XenStore nodes.
blktap has three components. tapdisk is a daemon implementing the disk IO, NBD (Network Block Device), and Xen PV interfaces. tap-ctl is a tool to control tapdisks - creating, starting, stopping and freeing. tapback manages the XenStore operations and instructs tapdisk to connect.
It is notable that tapdisk performs the grant and event channel ops, but doesn't interact with XenStore. tapback performs XenStore operations and notifies tapdisks of values and changes.
The flow is: libxl writes to the "vbd3" XenStore nodes and runs the block-tap script. The block-tap script runs tap-ctl to create a tapdisk instance as the physical device. tapback then sees the tapdisk and instructs the tapdisk to connect up the PV blkif interface.
This is expected to work without the kernel blktap driver, so the block-tap script is modified accordingly to write the UNIX NBD path. (It works with the kernel blktap driver as well - upstream blktap hasn't removed the blktap driver requirement yet -
https://github.com/xapi-project/blktap/pull/364)
An example command to attach a vhd:
xl block-attach vm 'vdev=xvdf,backendtype=tap,format=vhd,target=/srv/target.vhd'
VHD support is important for OpenXT since there are lots of existing VHDs which still need supporting. tapdisk also supports encrypted VHDs which is not available in QEMU.
blktap's tapback needs minimal changes to work with libxl:
https://github.com/xapi-project/blktap/pull/394
With a stubdom, the block-tap isn't executed a second time meaning tap-ctl destroy isn't called. The stubdom's disk xenstore frontend entry is removed, but tapback does nothing for this case right now. Making FE removal transition the BE to closed lets the hotplug script run properly.
v2 addresses review comments and adds a CHANGELOG entry.
Jason Andryuk (3):
hotplug: Update block-tap
libxl: Support blktap with HVM device model
CHANGELOG: Mention libxl blktap/tapback support
CHANGELOG.md | 1 + tools/hotplug/Linux/block-tap | 169 +++++++++++++++++++++++++++++++--- tools/libs/light/libxl_disk.c | 18 +++- tools/libs/light/libxl_dm.c | 1 - 4 files changed, 172 insertions(+), 17 deletions(-)
Signature · 1 line
2.39.2