On 04/19/2017 08:47 PM, Phil Susi wrote:
On 4/18/2017 11:28 PM, Wang Dong wrote:
The user offers an end, and if it is smaller than the partition end,
it is a shrinking. And this exception will only be raised when a shrinking
happens. I think we can check if it is a shrinking earlier. I mean
change the disk layout.
The user may specify to add 1 sector to the end, but after applying it,
the partition table code may decide to snap it down to a cylinder
boundary, resulting it in now shrinking the partition.
"Your discard" can not be done without a device re-reading. User has to
the device to get the real disk layout. This is not good I think. It
You don't have to re-read. As I said before, you just have to make a
copy of the PedDisk, modify the copy, leaving the original alone, and
then pick which to keep and which to discard.
Ah, I got you now.
Best regards. Wang Dong