mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
LXC: Set default driver for image backed filesystems
If no explicit driver is set for an image backed filesystem, set it to use the loop driver (if raw) or nbd driver (if non-raw) Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
2e832b18d6
commit
3aac4e5632
@ -462,6 +462,14 @@ static int virLXCControllerSetupLoopDevices(virLXCControllerPtr ctrl)
|
||||
if (fs->type != VIR_DOMAIN_FS_TYPE_FILE)
|
||||
continue;
|
||||
|
||||
if (fs->fsdriver == VIR_DOMAIN_FS_DRIVER_TYPE_DEFAULT) {
|
||||
if (fs->format == VIR_STORAGE_FILE_RAW ||
|
||||
fs->format == VIR_STORAGE_FILE_NONE)
|
||||
fs->fsdriver = VIR_DOMAIN_FS_DRIVER_TYPE_LOOP;
|
||||
else
|
||||
fs->fsdriver = VIR_DOMAIN_FS_DRIVER_TYPE_NBD;
|
||||
}
|
||||
|
||||
if (fs->fsdriver == VIR_DOMAIN_FS_DRIVER_TYPE_LOOP) {
|
||||
if (fs->format != VIR_STORAGE_FILE_RAW &&
|
||||
fs->format != VIR_STORAGE_FILE_NONE) {
|
||||
|
Loading…
Reference in New Issue
Block a user