[parted-devel] [RFC] [PATCH 0/6] reintroduce resize

Phillip Susi psusi at ubuntu.com
Fri Jan 18 04:56:33 UTC 2013


The following series reintroduces the ability to resize partitions to
parted.  They build on some previous work by Petr Uzel and the new
resize BLKPG ioctl options in recent kernels.  The new acting command
is resizepart, and a hidden dummy command "resize" has been added
for backward compatability with scripts that still use the removed
command.  The resize command now just errors out complaining that
it has been removed.  This is to avoid being auto completed to the
new resizepart command, which only moves the end point of a partition
without affecting the filesystem it contains.  The resizepart command
will use the new BLKPG ioctl to update the kernel partition table
if the partition is in use.  This allows expanding ( or even shrinking
in the case of btrfs ) of a partition while it is mounted, when used
in conjunction with the approrpiate external fs utility to modify
the size of the filesystem.

Petr Uzel (2):
  parted: resizepart command
  tests: excersise resize command

Phillip Susi (4):
  libparted: Add support for BLKPG ioctl partition resize
  parted: make _partition_warn_busy actually a warning instead of an
    error
  parted: Allow undocumented commands
  parted: Add stub resize command for backward compatibility

 libparted/arch/linux.c                          |   56 ++++++++++
 parted/command.c                                |    2 +
 parted/parted.c                                 |  124 +++++++++++++++++++++--
 tests/Makefile.am                               |    1 +
 tests/t1101-busy-partition.sh                   |    2 +-
 tests/t3200-resize-partition.sh                 |   90 ++++++++++++++++
 tests/t9041-undetected-in-use-16th-partition.sh |    4 +-
 7 files changed, 268 insertions(+), 11 deletions(-)
 create mode 100755 tests/t3200-resize-partition.sh

-- 
1.7.10.4




More information about the parted-devel mailing list