Commit c0cfc55
committed
CP-11936: Automatically plug block-based RAW VDIs via blkback
This patch causes block-based (LV) RAW VDIs to be automatically plugged by
blkback. This is achieved as follows:
During VDI.attach, we detect that the SR handles LVM and that the VDI driver
is 'aio'. In that case, we write 'backend-kind: vbd' to xenstore_data, which
causes the toolstack to use the /local/domain/0/backend/vbd/ path instead of
.../vbd3/. This is the preferred method following CP-11511. By writing to
.../vbd/, blkback wakes up instead of tapback.
During VDI.activate, we create the /dev/sm/backend/ node using the maj/min
numbers of the actual VDI (LV) instead of those of the blktap2 device. This
causes the udev hotplug scripts to write the /physical-device/ entry with
information of the LV, creating the blkfront-blkback-vdi datapath without
blktap2 or tapdisk3 in the middle.
Note that a tapdisk3 and a blktap2 will still exist in dom0, providing all
necessary backend infrastructure resources for other operations.
Signed-off-by: Felipe Franciosi <[email protected]>1 parent 86a988b commit c0cfc55
1 file changed
+19
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1184 | 1184 | | |
1185 | 1185 | | |
1186 | 1186 | | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
1187 | 1193 | | |
1188 | 1194 | | |
1189 | 1195 | | |
| |||
1487 | 1493 | | |
1488 | 1494 | | |
1489 | 1495 | | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
1490 | 1503 | | |
1491 | 1504 | | |
1492 | 1505 | | |
| |||
1571 | 1584 | | |
1572 | 1585 | | |
1573 | 1586 | | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
1574 | 1592 | | |
1575 | 1593 | | |
| 1594 | + | |
1576 | 1595 | | |
1577 | 1596 | | |
1578 | 1597 | | |
| |||
0 commit comments