[parted-devel] Bug: Removal of BLKPG causes regression of ability to manipulate disks with other partitions in use
Petr Uzel
petr.uzel at suse.cz
Thu Apr 1 11:26:09 UTC 2010
On Tue, Mar 30, 2010 at 03:37:38PM -0400, Phillip Susi wrote:
> How do these look? By the way, why are we using ped_malloc() and not
> ped_free()? Passing a pointer to free() that did not come from malloc()
> is an error, so only works as long as ped_malloc() is just a wrapper for
> malloc(), and if that has to be the case, what is the point of ped_malloc()?
>
> From 9c70d40066e731fbb81eaad34acf251b98fc6aa7 Mon Sep 17 00:00:00 2001
> From: Phillip Susi <psusi at cfl.rr.com>
> Date: Tue, 30 Mar 2010 15:11:53 -0400
> Subject: [PATCH 2/2] Improve BLKPG error checking
>
> This patch cleans up the BLKPG code that the previous patch put back
> to perform proper error checking and in the event that some partitions
> are in use, they can not be modified in the running kernel using BLKPG.
> Warn the user that this is the case and advise them to reboot, just like
> we do when BLKRRPART fails for the same reason, unless the partition in
> question is unchanged.
[...]
> + if (geom.start == part->geom.start &&
> + length == part->geom.length)
> + rets[i - 1] = 1;
> + /* if the new partition is unchanged and the exiting
s/exiting/existing
> + one was not removed because it was in use, then
> + reset the error flag and skip adding it
> + since it is already there */
> + continue;
> + }
Cheers,
Petr
--
Petr Uzel, openSUSE Boosters Team
IRC: ptr_uzl @ freenode
More information about the parted-devel
mailing list