Re: bug in 2.6.22-rc2: loop mount limited to one single iso image

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrey Borzenkov
Date: Saturday, May 19, 2007 - 9:45 pm

On Sunday 20 May 2007, Uwe Bugla wrote:
ly
nt
'd
st

because they are just followup to the real cause. This is causes by commit

commit 73285082745045bcd64333c1fbaa88f8490f2626
Author: Ken Chen <kenchen@google.com>
Date:   Tue May 8 00:28:20 2007 -0700

    remove artificial software max_loop limit


look what it did (abridged):

=2Dstatic int __init loop_init(void)
[...]
=2D       for (i =3D 0; i < max_loop; i++) {
=2D               disks[i] =3D alloc_disk(1);
=2D               if (!disks[i])
=2D                       goto out_mem3;
        }
=2D
=2D       for (i =3D 0; i < max_loop; i++) {
=2D               struct loop_device *lo =3D &loop_dev[i];
=2D               struct gendisk *disk =3D disks[i];
=2D
=2D               memset(lo, 0, sizeof(*lo));
=2D               lo->lo_queue =3D blk_alloc_queue(GFP_KERNEL);
=2D               if (!lo->lo_queue)
=2D                       goto out_mem4;
=2D               mutex_init(&lo->lo_ctl_mutex);
=2D               lo->lo_number =3D i;
=2D               lo->lo_thread =3D NULL;
=2D               init_waitqueue_head(&lo->lo_event);
=2D               spin_lock_init(&lo->lo_lock);
=2D               disk->major =3D LOOP_MAJOR;
=2D               disk->first_minor =3D i;
=2D               disk->fops =3D &lo_fops;
=2D               sprintf(disk->disk_name, "loop%d", i);
=2D               disk->private_data =3D lo;
=2D               disk->queue =3D lo->lo_queue;
=2D       }
=2D
=2D       /* We cannot fail after we call this, so another loop!*/
=2D       for (i =3D 0; i < max_loop; i++)
=2D               add_disk(disks[i]);

So before this commit we got /dev/loop%d up to max_loop when loop was loade=
d.=20
After this commit we get nothing (I still wonder wheher lone loop0 comes fr=
om=20
after reboot, because reloading module leaves me without /dev/loop%n=20
alltogether).

This is a real regression because on udev-enabled system (probably 99% of=20
distributions now) losetup as available in current util-linux simply stops=
=20
working.

=2Dandrey

2.
e,
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: bug in 2.6.22-rc2: loop mount limited to one single is ..., Andrey Borzenkov, (Sat May 19, 9:45 pm)
Re: bug in 2.6.22-rc2: loop mount limited to one single is ..., Andrey Borzenkov, (Sat May 19, 11:58 pm)
Re: bug in 2.6.22-rc2: loop mount limited to one single is ..., Andrey Borzenkov, (Mon May 21, 10:51 am)