CP-11936: Automatically plug block-based RAW VDIs via blkback#251
Open
franciozzy wants to merge 1 commit intoxapi-project:masterfrom
Open
CP-11936: Automatically plug block-based RAW VDIs via blkback#251franciozzy wants to merge 1 commit intoxapi-project:masterfrom
franciozzy wants to merge 1 commit intoxapi-project:masterfrom
Conversation
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 <felipe@paradoxo.org>
Contributor
|
Reviewed and tested. Looks good to merge @franciozzy |
Contributor
Author
|
Placed in the PQ. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 felipe@paradoxo.org