Bug 896160 - kernel: loop - please do not pre-create devices: CONFIG_BLK_DEV_LOOP_MIN_COUNT=0
Summary: kernel: loop - please do not pre-create devices: CONFIG_BLK_DEV_LOOP_MIN_COUNT=0
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Josh Boyer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-16 18:36 UTC by Kay Sievers
Modified: 2013-12-27 22:44 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-05-10 15:01:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Kay Sievers 2013-01-16 18:36:38 UTC
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 18:46:53 UTC
(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 18:54:11 UTC
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 18:56:57 UTC
ACK ;-)

Comment 4 Fedora End Of Life 2013-04-03 15:43:34 UTC
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 19:33:07 UTC
Moving this to rawhide.  Clearly this missed early F19 :\.  I'll try and get to it tomorrow.

Comment 6 Josh Boyer 2013-05-10 15:01:15 UTC
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 10:28:38 UTC
(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 23:17:24 UTC
See https://bugzilla.redhat.com/show_bug.cgi?id=993637 .

Comment 9 Tom Horsley 2013-12-26 19:45:38 UTC
>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 22:44:10 UTC
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.