[parted-devel] Warning message if create partition when a partition is mounted
Jim Meyering
jim at meyering.net
Mon Oct 19 20:57:39 UTC 2009
Curtis Gedak wrote:
> Jim Meyering wrote:
>> Please explain why you care.
>>
>> As I've said repeatedly, I think it's an advantage to be warned when doing
>> something like that. That you are pursuing this issue makes me think
>> you must have a compelling use case that requires modifying a partition
>> table while one of its partitions is mounted. If so, please describe it.
>>
>
> Good question Jim and I am glad you asked.
>
> The reason I have been following up on this, perhaps incorrectly, is
> because there is legacy code in GParted that uses the
> ped_disk_commit_to_os() to determine if a device can have it's
> partition table re-read by the kernel.
But that is only useful if that partition table has been changed.
Is GParted changing partition tables that have mounted partitions?
If so, wouldn't it be better to refuse to do that, requesting that the
user first unmount those partitions?
> If the function returns a 0,
> GParted will display a dialog box indicating the list of devices for
> which this is a problem.
>
> I assume (and I could be wrong here) that the kernel _can_ re-read the
> partition table because I am able to format and mount the newly
> created partition without a reboot. This leads me to believe that the
> return value of this function is in error when re-reading the
> partition table of a device with at least one partition mounted.
>
> If you believe that parted is functioning correctly in this regard,
> then I will cease delving into this issue.
>
> GParted relies heavily on the parted project for it's functionality.
> I am very thankful to the parted project and all of its contributors
> for creating the libparted library. As such I will work with whatever
> decision is made regarding this behaviour.
>
> From a GParted user perspective I can simply remove the GParted code
> that displays this warning message.
More information about the parted-devel
mailing list