Skip to contentSkip to conversation

kvm tools: Make raw block device work

PATCH Pekka Enberg 1 participant 1 message Apr 15, 2012 1 message not in the archive KVM

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Pekka Enberg

author Applied
#1 lore raw
Quoted 13 lines · Asias He

From: Asias He <[email protected]>

Previously, we use mmaped host root partition as guest's root filesystem. As virtio-9p based root filesystem is supported, mmaped host root partition approach is not used anymore.

It is useful to use raw block device as guest's disk backend for some user. e.g. bypass host's fs layer.

This patch makes raw block device work as disk image, user can do read/write on raw block device, by using DISK_IMAGE_REGULAR instead of DISK_IMAGE_MMAP for block device

Quoted 7 lines

Changes in v3:
- Add fclose.

Changes in v2:
- Check whether the block device is mounted before use it.

Applied, thanks!