On Sat, Oct 27, 2007 at 12:44:51PM +0200, [EMAIL PROTECTED] wrote:
> it seems that losetup doesn`t yet honour recent kernel change (see
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=73285082745045bcd64333c1fbaa88f8490f2626
> ) to allow more than 256 loop-devices.
Ah, I remember this thing from lkml.
> loop-device creation is dynamically now, is there already work in
> progress for support in losetup ?
If I good remember there is not any other who how create a loop device
than by "max_loop" or "mknod /dev/loopN". It means we needn't to add
to losetup(8) any extra support for dynamically allocated loop devices.
So, we need increment hardcoded limit of loop devices only. Right?
> i would have send a fix, but i`m unsure if just changing limitations in
> lomount.c
>
> show_used_loop_devices (void) {
> ....
> for (j = 0; j < SIZE(loop_formats); j++) {
> for(i = 0; i < 256; i++) {
> sprintf(dev, loop_formats[j], i);
>
> and
>
> find_unused_loop_device (void) {
> ....
> for (j = 0; j < SIZE(loop_formats); j++) {
> for(i = 0; i < 256; i++) {
> sprintf(dev, loop_formats[j], i);
>
>
> is the way to go since MINOR limit of device nodes seems to be at
> 1048575 and that`s probably a little bit to large value to loop
> trough.
Read the code. It doesn't check for all devices in range 0..256 -- it
breaks the for() loop when a /dev/loopN doesn't exist. For example on
my system it doesn't check for more than nine device. I don't see a
problem with a huge limit.
Karel
--
Karel Zak <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html