[parted-devel] [PATCH 2/3] Remove has_partitions check to allow loopback partitions

Phillip Susi psusi at cfl.rr.com
Fri Dec 2 13:56:55 UTC 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/02/2011 03:53 AM, Petr Uzel wrote:
| On Thu, Dec 01, 2011 at 04:38:33PM -0500, Phillip Susi wrote:
|> Commit 1b766b69 added the _has_partitions function to check if a device
|> was a loop device and if so, skip updating the kernel partition table
|> because loop devices did not support partitions.  This function never
|> worked anyway,
|
| Could you be more specific about when does it not work?

It looks for disk->type->name to be "loop" but instead it is "msdos".  I checked out that commit to see if it worked then and it happily created the partition devices on the loop device.

|> and loop devices now ( since linux 3.0 ) support partitions,
|> so remove this crufty code.
|
| Doesn't it break parted+loop devices with older than 3.0 kernel?

It was *supposed* to disable even attempting to partition loopback devices on any kernel.  It didn't actually do so, so on older kernels that didn't support partitions, you would get errors.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7Y2ScACgkQJ4UciIs+XuJBJgCfd3r+NjLjzobYQsERB62ew8qs
qSkAoMI4+sRNEpK1K75LUo4pYFZey/qb
=dHwo
-----END PGP SIGNATURE-----



More information about the parted-devel mailing list