Bug 896160 - kernel: loop - please do not pre-create devices: CONFIG_BLK_DEV_LOOP_MIN_COUNT=0
kernel: loop - please do not pre-create devices: CONFIG_BLK_DEV_LOOP_MIN_COUNT=0
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Josh Boyer
Fedora Extras Quality Assurance
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-16 13:36 EST by Kay Sievers
Modified: 2013-12-27 17:44 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-05-10 11:01:15 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Kay Sievers 2013-01-16 13:36:38 EST
Please set:
  CONFIG_BLK_DEV_LOOP_MIN_COUNT=0

Loop devices can and should be created on-demand, and only when needed, losetup
has been updated since Fedora 17 to do that just fine. Nothing should require
an arbitrary number of pre-created dead and dumb devices, and hope it will
find an unused one in that number.

We should disable it early in Fedora 19 and see if anything still relies on
the I-hope-it-will-work-out facility. If that's the case, we should fix it
properly.
In any case, the old behaviour can always be requested with a kernel command
line option.

And if there is no specific reason, please als turn loop into a loadable module:
  CONFIG_BLK_DEV_CRYPTOLOOP=m
It's not an early-boot or essential functionality, it should be fine to loa dthe module only on-demand, which happens automatically by udev when /dev/loop-control
is accessed.
That way, even a modprobe.d/ config file can specify the number of pre-created
devices.

Thanks!
Comment 1 Kay Sievers 2013-01-16 13:46:53 EST
(In reply to comment #0)
> And if there is no specific reason, please als turn loop into a loadable
> module:
>   CONFIG_BLK_DEV_CRYPTOLOOP=m

Oh, that should be:
  CONFIG_BLK_DEV_LOOP=m
Comment 2 Kay Sievers 2013-01-16 13:54:11 EST
While at it, maybe we can also disable:
  CONFIG_BLK_DEV_CRYPTOLOOP=n

Fedora 18 was the last version of util-linux supporting cryptoloop
devices, it all needs to be done by dmcrypt these days.
Comment 3 Karel Zak 2013-01-16 13:56:57 EST
ACK ;-)
Comment 4 Fedora End Of Life 2013-04-03 11:43:34 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19
Comment 5 Josh Boyer 2013-05-08 15:33:07 EDT
Moving this to rawhide.  Clearly this missed early F19 :\.  I'll try and get to it tomorrow.
Comment 6 Josh Boyer 2013-05-10 11:01:15 EDT
OK, I've made all three changes.  Hopefully dracut will bring in the loop module if it needs it for anything in the initramfs.
Comment 7 Harald Hoyer 2013-05-29 06:28:38 EDT
(In reply to Josh Boyer from comment #6)
> OK, I've made all three changes.  Hopefully dracut will bring in the loop
> module if it needs it for anything in the initramfs.

yes it does, except for the dracut crypt-loop module, which is not working anyway anymore.
Comment 8 Adam Williamson 2013-08-06 19:17:24 EDT
See https://bugzilla.redhat.com/show_bug.cgi?id=993637 .
Comment 9 Tom Horsley 2013-12-26 14:45:38 EST
>In any case, the old behaviour can always be requested with a kernel command
>line option.

I don't suppose you'd care to mention what the kernel command line option is?

This breaks realcrypt a.k.a truecrypt.
Comment 10 DaN 2013-12-27 17:44:10 EST
Hi,

I solved this problem by creating my own loop device because I don't want to change the kernel parameters. 
The other method I think it is described in the bug https://bugzilla.redhat.com/show_bug.cgi?id=1019440

Took the script from http://www.tldp.org/HOWTO/CDServer-HOWTO/addloops.html , bottom of the page "3.4. Creating the Loop Devices in /dev"

loop_device=/dev/loop8

if [ -b $loop_device ]; then
        echo "$loop_device already exists! Exiting!"
        exit
else
        sudo mknod -m660 $loop_device b 7 8
        sudo chown root:disk $loop_device
        sudo chmod 666 $loop_device

        truecrypt <container> <mount_point>
fi

Cheers,
Dan

Note You need to log in before you can comment on or make changes to this bug.