Red Hat Bugzilla – Bug 995543
Add support for using /dev/loop-control for allocating loop devices
Last modified: 2015-03-18 08:02:34 EDT
Description of problem:
Currently virFileLoopDeviceOpen iterates over /dev identifying loop devices and then checking if they are in use or not.
There is a fairly new /dev/loop-control device that avoids this insanity and also lets you dynamically create new loop devices as needed
Libvirt should use this code and only fallback to its existing impl, if /dev/loop-control does not exist
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Attempt to start more than 8 LXC guests whcih use loop devices (ie type=file)
<filesystem type='file' accessmode='passthrough'>
Failed to start 9th guest due to non-existant loop8 device.
Can start many more guests
Posted patch to resolve this bug.
Author: Ian Main <firstname.lastname@example.org>
AuthorDate: 2013-09-05 12:04:33 +0100
Commit: Daniel P. Berrange <email@example.com>
CommitDate: 2013-09-05 12:31:08 +0100
Use loop-control to allocate loop device.
This patch changes virFileLoopDeviceOpen() to use the new loop-control
device to allocate a new loop device. If this behavior is unsupported
we fall back to the previous method of searching /dev for a free device.
With this patch you can start as many image based LXC domains as you
like (well almost).
Fixes bug https://bugzilla.redhat.com/show_bug.cgi?id=995543
git describe: v1.1.2-67-g9ba230d contains: v1.1.3-rc1~210