Re: [PATCH 3/7] Re-arrange code setting up ifs/disk loop devices for LXC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/15/2013 12:32 PM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
> 
> The current code for setting up loop devices to LXC disks first
> does a switch() based on the disk format, then looks at the
> disk driver name. Reverse this so it first looks at the driver
> name, and then the disk format. This is more useful since the
> list of supported disk formats depends on what driver is used.
> 
> The code for setting loop devices for LXC fs entries also needs
> to have the same logic added, now the XML schema supports this.
> 
> Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> ---
>  src/lxc/lxc_controller.c | 76 +++++++++++++++++++++++++++---------------------
>  1 file changed, 43 insertions(+), 33 deletions(-)
> 

ACK

I take it the checking for FS_DRIVER_TYPE_LOOP in the first loop is just
an optimization (or sanity check) over making more calls and determining
the same thing.  IOW previous the first loop didn't care about fsdriver
type before making the SetupLoopDeviceFS call, but that could fail if it
wasn't a loop device.

John

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]