All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2][V3] block: Support online resize of disk partitions
@ 2012-02-14 20:39 Vivek Goyal
  2012-02-14 20:39 ` [PATCH 1/2] block: add partition resize function to blkpg ioctl Vivek Goyal
  2012-02-14 20:39 ` [PATCH 2/2] util-linux: resizepart: Utility to resize a partition Vivek Goyal
  0 siblings, 2 replies; 12+ messages in thread
From: Vivek Goyal @ 2012-02-14 20:39 UTC (permalink / raw)
  To: linux-kernel, axboe, dm-devel, kzak; +Cc: vgoyal, psusi, psusi, maxim.patlasov

Hi,

This is V3 of patch which adds support for online resizing of a partition.
This patch is based on previously posted patches by Phillip Susi.

There are two patches. Out of which one is kernel patch and other one is
util-linux patch to add support of a user space utility "resizepart" to
allow resizing the partition.

This ioctl only resizes the partition size in kenrel and does not change
the size on disk. A user needs to make sure that corresponding changes
are made to disk data structures also using fdisk(or partx), if changes
are to be retained across reboot.

Changes since V2
----------------
- Do not ignore the "start" parameter in RESIZE ioctl.
- Change resizepart utility to parse sysfs to get to partition start.

Changes since V1
----------------
Following are changes since the version Phillip posted.

- RESIZE ioctl ignores the partition "start" and does not expect user to
  specify one. Caller needs to just specify "device", "partition number" and
  "size" of new partition. 

- Got rid of part_nr_sects_write_begin/part_nr_sects_write_end functions
  and replaced these with single part_nr_sects_write().

- Some sequence counter related changes are simply lifted from i_size_write().

- Initialized part->nr_sects_seq using seqcount_init().

Phillip, do let me know if I should put your signed-off-by also in the
patch.

Any review feedback is welcome.

I did following test.

- Create a partition of 10MB on a disk using fdisk.
- Add this partition to a volume group
- Use fdisk to increase the partition size to 20MB. (First delete the
  partition and then create a new one of 20MB size).
- Use resizepart to extend partition size in kernel.
	resizepart /dev/sdc 1 40960
- Do pvresize on partition so that physical volume can be incrased in
  size online.
	pvresize /dev/sda1

pvresize does recognize the new size. Also lsblk and /proc/partitions
report the new size of partition.

Thanks
Vivek

[PATCH 1/2] block: add partition resize function to blkpg ioctl
[PATCH 2/2] util-linux: resizepart: Utility to resize a partition

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [patch 0/2] [V4] block: Support online resize of disk partitions
@ 2012-07-09 21:34 vgoyal
  2012-07-09 21:34 ` [patch 1/2] block: add partition resize function to blkpg ioctl vgoyal
  0 siblings, 1 reply; 12+ messages in thread
From: vgoyal @ 2012-07-09 21:34 UTC (permalink / raw)
  To: linux-kernel, axboe, dm-devel, kzak; +Cc: psusi, vgoyal, maxim.patlasov

Hi,

Few people have pinged me in rencent past about status of this patch, hence,
this is V4 of patch which adds support for online resizing of a partition.
This patch is based on previously posted patches by Phillip Susi. 

There are two patches. Out of which one is kernel patch and other one is
util-linux patch to add support of a user space utility "resizepart" to
allow resizing the partition.

This ioctl only resizes the partition size in kenrel and does not change
the size on disk. A user needs to make sure that corresponding changes
are made to disk data structures also using fdisk(or partx), if changes
are to be retained across reboot.

Changes since V3
----------------
- Do bdput() in error path as per the Maxim's review comments.

Changes since V2
----------------
- Do not ignore the "start" parameter in RESIZE ioctl.
- Change resizepart utility to parse sysfs to get to partition start.

Changes since V1
----------------
Following are changes since the version Phillip posted.
- RESIZE ioctl ignores the partition "start" and does not expect user to
  specify one. Caller needs to just specify "device", "partition number" and
  "size" of new partition.

- Got rid of part_nr_sects_write_begin/part_nr_sects_write_end functions
  and replaced these with single part_nr_sects_write().

- Some sequence counter related changes are simply lifted from i_size_write().

- Initialized part->nr_sects_seq using seqcount_init().

Phillip, do let me know if I should put your signed-off-by also in the
patch.

Any review feedback is welcome.

I did following test.

- Create a partition of 10MB on a disk using fdisk.
- Add this partition to a volume group
- Use fdisk to increase the partition size to 20MB. (First delete the
  partition and then create a new one of 20MB size).
- Use resizepart to extend partition size in kernel.
        resizepart /dev/sdc 1 40960
- Do pvresize on partition so that physical volume can be incrased in
  size online.
        pvresize /dev/sda1

pvresize does recognize the new size. Also lsblk and /proc/partitions
report the new size of partition.

Thanks
Vivek

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH 0/2] block: online resize of disk partitions
@ 2012-02-13 19:30 Vivek Goyal
  2012-02-13 19:30 ` [PATCH 1/2] block: add partition resize function to blkpg ioctl Vivek Goyal
  0 siblings, 1 reply; 12+ messages in thread
From: Vivek Goyal @ 2012-02-13 19:30 UTC (permalink / raw)
  To: linux-kernel, axboe, dm-devel, kzak; +Cc: vgoyal, psusi, psusi, maxim.patlasov

Hi,

Following patch adds support for online resizing of a partition. This patch
is based on previously posted patches by Phillip Susi.

There are two patches. Out of which one is kernel patch and other one is
util-linux patch to add support of a user space utility "resizepart" to
allow resizing the partition.

This ioctl only resizes the partition size in kenrel and does not change
the size on disk. A user needs to make sure that corresponding changes
are made to disk data structures also using fdisk(or partx), if changes
are to be retained across reboot.

I made some changes according to the feedback received last time. Following
are changes since the version Phillip posted.

- RESIZE ioctl ignores the partition "start" and does not expect user to
  specify one. Caller needs to just specify "device", "partition number" and
  "size" of new partition. 

- Got rid of part_nr_sects_write_begin/part_nr_sects_write_end functions
  and replaced these with single part_nr_sects_write().

- Some sequence counter related changes are simply lifted from i_size_write().

- Initialized part->nr_sects_seq using seqcount_init().

Phillip, do let me know if I should put your signed-off-by also in the
patch.

Any feedback is welcome.

I did following test.

- Create a partition of 10MB on a disk using fdisk.
- Add this partition to a volume group
- Use fdisk to increase the partition size to 20MB. (First delete the
  partition and then create a new one of 20MB size).
- Use resizepart to extend partition size in kernel.
	resizepart /dev/sdc 1 40960
- Do pvresize on partition so that physical volume can be incrased in
  size online.
	pvresize /dev/sda1

pvresize does recognize the new size. Also lsblk and /proc/partitions
report the new size of partition.

Thanks
Vivek

[PATCH 1/2] block: add partition resize function to blkpg ioctl
[PATCH 2/2] resizepart: Utility to resize a partition

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-07-09 21:34 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-14 20:39 [PATCH 0/2][V3] block: Support online resize of disk partitions Vivek Goyal
2012-02-14 20:39 ` [PATCH 1/2] block: add partition resize function to blkpg ioctl Vivek Goyal
2012-02-20 14:42   ` Vivek Goyal
2012-02-20 15:17     ` Phillip Susi
2012-02-20 15:28   ` Vivek Goyal
2012-03-02 18:54     ` Vivek Goyal
2012-07-07  1:51       ` Phillip Susi
2012-07-09 15:13         ` Vivek Goyal
2012-04-09 16:40   ` Maxim V. Patlasov
2012-02-14 20:39 ` [PATCH 2/2] util-linux: resizepart: Utility to resize a partition Vivek Goyal
  -- strict thread matches above, loose matches on Subject: below --
2012-07-09 21:34 [patch 0/2] [V4] block: Support online resize of disk partitions vgoyal
2012-07-09 21:34 ` [patch 1/2] block: add partition resize function to blkpg ioctl vgoyal
2012-02-13 19:30 [PATCH 0/2] block: online resize of disk partitions Vivek Goyal
2012-02-13 19:30 ` [PATCH 1/2] block: add partition resize function to blkpg ioctl Vivek Goyal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.