Brian C. Lane wrote: > On Wed, Dec 21, 2011 at 07:30:43PM +0100, Jim Meyering wrote: >> On Fedora 16 (3.1.5-6.fc16.x86_64), the two t8000*loop.sh tests have >> been failing for some time. I've finally investigated and found it is >> due to this: > > It may be related to commit 1eb0cc30 where loop_get_partition_range was > added. It reads from '/sys/module/loop/parameters/max_part' which on my > F15 system (kernel 2.6.41.4-1.fc15.x86_64) returns 0. > > Partitioned loop devices certainly do work, so I think this is an error. > I also am not sure what will happen with systems where loop is not a > module.
Hi Brian, I'm pretty sure this is an F16 kernel-related bug. When I create a loop device like this on F16, truncate -s10m a && t=$(losetup --show -f a) and print its ext_range value, cat /sys/devices/virtual/block/$(basename $t)/ext_range I get "1", which means not partitionable, according to disk_max_parts in include/linux/genhd.h which just returns gendisk.minors, described like this: struct gendisk { /* major, first_minor and minors are input parameters only, * don't use directly. Use disk_devt() and disk_max_parts(). */ int major; /* major number of driver */ int first_minor; int minors; /* maximum number of minors, =1 for However, when I do the same on rawhide (3.2.0-0.rc7.git4.1.fc17.x86_64), I get a reasonable value: 256. I've just filed a BZ for this: http://bugzilla.redhat.com/771641