Improved logic in cleanup_cursor method to minimize the number of
string erase operations performed.
Previously when the NTFS copy finished, GParted would take an
exceptionally long time to clean up the output. This was due to
the huge number of small string erase operations performed on a
extremely large string.
A patch to alleviate the "failure to inform kernel of partition
changes problem" (bug #604298) has been included in parted-2.2.
Hence when parted-2.2 or higher is used, the work around code in
GParted is not required.
According to parted documentation, only "msdos" and "dvh" disk
types (or partition table types) support extended partitions.
All other disk types support primary partitions only.
Building GParted with gtkmm-2.4 version 2.14.0 would fail with:
error: ‘gtk_show_uri’ was not declared in this scope.
This problem does not occur with version 2.16.0.
This is not an ideal solution because devices with sector sizes
greater than 512 bytes are silently ignored from a graphical interface
perspective. Only if the user starts gparted from the command line
will the "ignoring device" message be seen.
In my opinion this short term solution of ignoring these devices is
still better than a gparted crash which might also result in data
loss.
A bug report requesting support for devices with sector sizes > 512
bytes has been created.
https://bugzilla.gnome.org/show_bug.cgi?id=607165
Thanks go to Jan Claeys for the initial small patch.
Bug #604298 involves a problem that can occur when GParted uses
libparted to manipulate a partition table, but the
ped_disk_commit_to_os() function fails to inform the Linux kernel of
these changes to the partition table. This problem is intermittent in
nature and is difficult to reliably reproduce.
This change is an attempt at a work around. If the first call to
ped_disk_commit_to_os() fails, then we sleep for 1 second to allow the
system to settle before invoking the function call again. My testing
has shown that this greatly improves the chances of successfully
informing the kernel of partition changes.
Thanks go to François Dupoux and Steven Shiau for their suggestions
and help to resolve this problem.