[parted-devel] [PATCH 1/3] Remove loop_get_partition_range

Petr Uzel petr.uzel at suse.cz
Fri Dec 2 15:14:17 UTC 2011


On Fri, Dec 02, 2011 at 09:12:13AM -0500, Phillip Susi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 12/02/2011 09:01 AM, Petr Uzel wrote:
> | On Fri, Dec 02, 2011 at 08:51:58AM -0500, Phillip Susi wrote:
> |> -----BEGIN PGP SIGNED MESSAGE-----
> |> Hash: SHA1
> |>
> |> On 12/02/2011 04:07 AM, Petr Uzel wrote:
> |> | If you load loop module without max_part argument, the loop devices
> |> | will have their ext_range sysfs attributes == 1 (here on kernel-3.1),
> |> | so parted won't attempt to inform the kernel about the partitions. Do
> |> | I miss something?
> |>
> |> I get 256 here on 3.2-rc3.
> |
> | Me too, on 3.2-rcX. The difference to 3.1 is likely linux kernel commit
> | e03c8dd14915fabc101aa495828d58598dc5af98
> |
> | https://lkml.org/lkml/2011/8/15/185
> |
> | So for older kernels, the (ugly) parsing of loop module params is
> | necessary.
> 
> Wait, you still get 1 even when you pass max_partitions? 

No, if I pass max_part=15 to modprobe, both range and ext_range are
16. So your change looks fine. I'm now trying to remember why I wrote
that parsing of loop's max_part module parameter and didn't rely only on
{ext_,}range to determine if the loopdev supports partitions...


> It looked
> like the value was being computed from max_partitions in 3.0 and
> 3.1.  On older kernels that don't have max_partitions, it is one and
> so the partitioning is effectively disabled.
 

Petr

--
Petr Uzel
IRC: ptr_uzl @ freenode



More information about the parted-devel mailing list