Bug 63421
Summary: | max loopback devices not detected but guessed | ||
---|---|---|---|
Product: | [Retired] Red Hat Public Beta | Reporter: | Simon Matter <simon.matter> |
Component: | mkinitrd | Assignee: | Matt Wilson <msw> |
Status: | CLOSED RAWHIDE | QA Contact: | David Lawrence <dkl> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | skipjack-beta1 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2002-04-15 07:31:25 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Simon Matter
2002-04-13 16:12:52 UTC
Sorry, I didn't look at the code well. Here is how a possible modification could look like: if [ -e /dev/.devfsd ]; then LOOPDEV=/dev/loop/ else LOOPDEV=/dev/loop fi unset LODEV for dev in ${LOOPDEV}*; do if losetup ${dev} $IMAGE 2>/dev/null; then LODEV=${dev} break fi done if [ -z "$LODEV" ]; then rm -rf $MNTPOINT $IMAGE echo "All of your loopback devices are in use!" >&2 exit 1 fi The only thing I don't like here is that loop devices are not tried in numerical order but that's not a true problem. I think with this code loop creation will succeed if you have a) enough loop devices enabled in kernel or via module parameter and b) have enough device nodes available I added a command to nash to find the right block device more elegantly, and the fix is in 3.3.11. It should work for up to 256 loopback devices. |