Re: /dev/loop* devices not appearing in /dev (at least since2.6.22-rc3*)

From: Paolo Ornati
Date: Thu Jun 14 2007 - 11:23:16 EST


On Thu, 14 Jun 2007 16:10:44 +0200
Matthew <jackdachef@xxxxxxxxx> wrote:

> I just tried out
>
> modprobe loop max_loop=32
>
> output of dmesg is:
>
> [ 457.607575] loop: the max_loop option is obsolete and will be
> removed in March 2008
> [ 457.607578] loop: module loaded
>
> but there are NO loop devices in /dev:
>
> ls -l /dev/ | grep loop
> still shows nothing, strange ...

it's not strange, with your kernel version "max_loop" will just limit
the max number of loop devices at most.

This is what happens with the mentioned patch (-rc5 and later):

+ /*
+ * loop module now has a feature to instantiate underlying device
+ * structure on-demand, provided that there is an access dev node.
+ * However, this will not work well with user space tool that doesn't
+ * know about such "feature". In order to not break any existing
+ * tool, we do the following:
+ *
+ * (1) if max_loop is specified, create that many upfront, and this
+ * also becomes a hard limit.
+ * (2) if max_loop is not specified, create 8 loop device on module
+ * load, user can further extend loop device by create dev node
+ * themselves and have kernel automatically instantiate actual
+ * device on-demand.
+ */


So with this patch "max_loop=32" will create 32 loop devices... but
then it doesn't allow more of them.

Without options it creates 8 and you (or some userspace tool) can add
more dynamically.

--
Paolo Ornati
Linux 2.6.22-rc4-cfs-v16-g47932c49 on x86_64
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/