Subject: Re: bug#16231: [PATCH] Fix loop labels

From: Phillip Susi <[email-masked]>
Date: Sun, 29 Dec 2013 00:25:30 -0500

On 12/23/2013 03:17 PM, Phillip Susi wrote:
> Loop labels were incorrectly identifying the device for the
> fictional partition as $dev1 instead of just $dev. This caused
> other programs like gparted to be confused, and caused parted to
> fail to identify the partition as busy due to the fact that it was
> looking for the wrong device. Parted also actually created the
> partition device so your raw fs on $dev gained an alias as $dev1.

I had to tweak this patch just a bit more to get it fully working.  It
used to let you create a loop label, which had no partition, then when
you created a partition, it wiped out the loop signature.  Now it
implicitly creates the loop partition if you either have the loop
label signature, or a raw filesystem signature, and thus, has to leave
the signature intact, even if you have a partition, which may or may
not have a valid filesystem signature, depending on whether or not you
actually format a filesystem.