Re: [PATCH] max_loop limit

Ken Chen
2007-03-25T00:17:27Z

On 3/23/07, Jan Engelhardt <jengelh@linux01.gwdg.de> wrote:
> Sadly, it locks up the foreground process (losetup that would be), and I
> have not yet figured out why. And the mpt regression elsewhere is
> hindering me in finding out faster.

You need to tell the block layer that each loop device is a whole
block device, not a partition within another device. Otherwise, I
think it will cause a recursive mutex lock in block_dev.c:do_open().

This patch should fix the problem.

Signed-off-by: Ken Chen <kenchen@google.com>

--- ./drivers/block/loop.c.orig 2007-03-24 17:05:51.000000000 -0700
+++ ./drivers/block/loop.c 2007-03-24 17:06:06.000000000 -0700
@@ -1464,6 +1464,7 @@

if ((lo = loop_find_dev(number)) == NULL) {
lo = loop_init_one(number);
+ *part = 0;
if (IS_ERR(lo))
return (void *)lo;
}