Displaying 20 results from an estimated 32 matches for "find_partition".
Did you mean:
find_partitions
2014 Sep 22
1
Re: [PATCH v3 3/7] resize: add function find_partitions
On Mon, Sep 22, 2014 at 03:47:36PM +0800, Hu Tao wrote:
> find_partitions can find partitions of given type.
>
> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
> ---
> resize/resize.ml | 21 ++++++++++++---------
> 1 file changed, 12 insertions(+), 9 deletions(-)
>
> diff --git a/resize/resize.ml b/resize/resize.ml
> index 8f2105c..cfd02fc...
2014 Sep 22
0
[PATCH v3 3/7] resize: add function find_partitions
find_partitions can find partitions of given type.
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
---
resize/resize.ml | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/resize/resize.ml b/resize/resize.ml
index 8f2105c..cfd02fc 100644
--- a/resize/resize.ml
+++ b/res...
2014 Sep 26
0
[PATCH v4 1/7] resize: add function find_partitions
find_partitions can find partitions of given type.
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
---
resize/resize.ml | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/resize/resize.ml b/resize/resize.ml
index 81bb270..cfd02fc 100644
--- a/resize/resize.ml
+++ b/...
2015 May 28
1
Re: [PATCH v2 03/11] resize: updated find_partition to support logical partition
On Wed, May 20, 2015 at 06:51:29AM -0400, Chen Hanxiao wrote:
> As we splited the original partitions list to
> partitions and logical_partitions.
>
> Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
> ---
> resize/resize.ml | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/resize/resize.ml b/resize/resize.ml
> index d7a8ce1..92f7304 100644
2015 May 20
0
[PATCH v2 03/11] resize: updated find_partition to support logical partition
As we splited the original partitions list to
partitions and logical_partitions.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
---
resize/resize.ml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/resize/resize.ml b/resize/resize.ml
index d7a8ce1..92f7304 100644
--- a/resize/resize.ml
+++ b/resize/resize.ml
@@ -616,6 +616,8 @@ read the man page virt-resize(1).
let hash
2014 Sep 22
13
[PATCH v3 0/7] add support to resize MBR logical partitions
...easier to review
2. fix the parted error caused by unaligned logical partitions
3. extend the content of logical partitions
4. refactor to make logical partitions a seperate list
Hu Tao (7):
resize: introduce partition_type
resize: simplify the code to filter parts
resize: add function find_partitions
resize: add function calculate_target_partitions
resize: add function mbr_part_type
resize: add partition type LogicalPartition
resize: add support to resize logical partitions
resize/resize.ml | 145 +++++++++++++++++++++++++++++++++++++++++--------------
1 file changed, 110 insertions(...
2015 Mar 30
1
[PATCH RFC] resize: add p_mbr_p_type as member of type partition
...ot;logical"
+ | NoTypePartition -> "none"
(* Data structure describing LVs on the source disk. This is only
* used if the user gave the --lv-expand option.
@@ -453,18 +462,9 @@ read the man page virt-resize(1).
| MBR_ID _ | GPT_Type _ | No_ID -> false
in
- let find_partitions part_type =
+ let find_partitions () =
let parts = Array.to_list (g#part_list "/dev/sda") in
- (* Filter out logical partitions. See note above. *)
- let parts =
- match part_type with
- (* for GPT, all partitions are regarded as Primary Partition,
- * e.g....
2014 Sep 22
0
[PATCH v3 6/7] resize: add partition type LogicalPartition
...3f804a0 100644
--- a/resize/resize.ml
+++ b/resize/resize.ml
@@ -75,6 +75,7 @@ and partition_id =
type partition_type =
| PrimaryPartition
+ | LogicalPartition
let rec debug_partition p =
eprintf "%s:\n" p.p_name;
@@ -449,13 +450,15 @@ read the man page virt-resize(1).
let find_partitions part_type =
let parts = Array.to_list (g#part_list "/dev/sda") in
- (* Filter out logical partitions. See note above. *)
let parts =
match part_type with
(* for GPT, all partitions are regarded as Primary Partition,
* e.g. there is no Extended Partit...
2014 Oct 08
0
[PATCH V5 1/4] resize: add partition type LogicalPartition
...cc76aa0 100644
--- a/resize/resize.ml
+++ b/resize/resize.ml
@@ -75,6 +75,7 @@ and partition_id =
type partition_type =
| PrimaryPartition
+ | LogicalPartition
let rec debug_partition p =
eprintf "%s:\n" p.p_name;
@@ -449,13 +450,15 @@ read the man page virt-resize(1).
let find_partitions part_type =
let parts = Array.to_list (g#part_list "/dev/sda") in
- (* Filter out logical partitions. See note above. *)
let parts =
match part_type with
(* for GPT, all partitions are regarded as Primary Partition,
* e.g. there is no Extended Partit...
2009 Aug 03
1
[PATCH] Recognise cd-rom devices in devsparts.c
...@ do_list_partitions (void)
{
char **r = NULL;
int size = 0, alloc = 0;
- DIR *dir, *dir2;
- struct dirent *d;
- char buf[256], devname[256];
- dir = opendir ("/sys/block");
- if (!dir) {
- reply_with_perror ("opendir: /sys/block");
- return NULL;
- }
+ int find_partitions(const char *device) {
+ struct dirent *d;
+ char devdir[256];
- while ((d = readdir (dir)) != NULL) {
- if (strncmp (d->d_name, "sd", 2) == 0 ||
- strncmp (d->d_name, "hd", 2) == 0 ||
- strncmp (d->d_name, "vd", 2) == 0) {
- snprintf (buf, si...
2015 May 20
15
[PATCH v2 00/11] virt-resize: add support for resizing MBR logical partitions
...flat list of logical partitions
- extended_partition
one MBR extended partition
2) reserve enough size when resizing logical partitions
Original patches by Hu Tao at:
https://www.redhat.com/archives/libguestfs/2014-October/msg00238.html
Chen Hanxiao (11):
resize: move loop check from find_partitions
resize: add logical_partitions and extended_partition
resize: updated find_partition to support logical partition
resize: add support for logical partitions for calculate_surplus
resize: handle resize of logical partitions
resize: add support for logical partitions of
calculate_targe...
2014 Oct 08
6
[PATCH V5 0/4] virt-resize: add support for resizing logical
Hi Rich,
This is v5 series to add support for resizing MBR logical partitions. please review. Thanks!
changes to v4:
1. add support to resize extended partition (--resize or --expand extended partition)
2. fix the problem of deficit of 512 bytes when expanding a logical partition
(this problem can be reproduced in v4 by only expanding a logical partition, without resizing any other
2013 Oct 18
0
[RFC/PATCH 3/3] Wire up MultiFS support.
...+ for (i = parts_info[disk]->first; i; i = i->next) {
+ if (i->partition == partition)
+ return i->fs;
+ }
+ return NULL;
+}
+
+/*
+ * Attempt to find a partition based on drive and partition numbers.
+ *
+ * @ret: 0 on success, -1 on failure.
+ */
+static int find_partition(struct part_iter **_iter, struct disk_info *diskinfo,
+ int partition)
+{
+ struct part_iter *iter = NULL;
+
+ if (!(iter = pi_begin(diskinfo, 0)))
+ return -1;
+
+ do {
+ if (iter->index == partition)
+ break;
+ } while (!pi_next(iter));
+
+ if (iter->sta...
2014 Oct 30
8
[PATCH v5 REBASE 0/4] virt-resize: add support for resizing logical
Hi Rich,
This is rebase of v5 series. Meanwhile, I found a bug when shrinking
partitions, and the fix is incuded in this version (patch 2).
Regards,
Hu
changes to v4:
1. add support to resize extended partition (--resize or --expand extended partition)
2. fix the problem of deficit of 512 bytes when expanding a logical partition
(this problem can be reproduced in v4 by only expanding a
2015 Jun 16
0
Re: [PATCH v3 00/11] virt-resize: add support for resizing MBR logical partitions
...ed_partition
> one MBR extended partition
>
> 2) reserve enough size when resizing logical partitions
>
> Original patches by Hu Tao at:
> https://www.redhat.com/archives/libguestfs/2014-October/msg00238.html
>
> Chen Hanxiao (11):
> resize: move loop check from find_partitions
> resize: add logical_partitions and extended_partition
> resize: calculate max alignment of logical partitions
> resize: add support for logical partitions for calculate_surplus
> resize: handle resize of logical partitions
> resize: add support for logical partitions of...
2015 Jun 24
0
Re: [PATCH v4 00/11] virt-resize: add support for resizing MBR logical partitions
...ed_partition
> one MBR extended partition
>
> 2) reserve enough size when resizing logical partitions
>
> Original patches by Hu Tao at:
> https://www.redhat.com/archives/libguestfs/2014-October/msg00238.html
>
> Chen Hanxiao (11):
> resize: move loop check from find_partitions
> resize: add logical_partitions and extended_partition
> resize: calculate max alignment of logical partitions
> resize: add support for logical partitions for calculate_surplus
> resize: handle resize of logical partitions
> resize: add support for logical partitions of...
2015 Jul 08
0
Re: [PATCH rebase v4 00/11] virt-resize: add support for resizing MBR logical partitions
...ed_partition
> one MBR extended partition
>
> 2) reserve enough size when resizing logical partitions
>
> Original patches by Hu Tao at:
> https://www.redhat.com/archives/libguestfs/2014-October/msg00238.html
>
> Chen Hanxiao (11):
> resize: move loop check from find_partitions
> resize: add logical_partitions and extended_partition
> resize: calculate max alignment of logical partitions
> resize: add support for logical partitions for calculate_surplus
> resize: handle resize of logical partitions
> resize: add support for logical partitions of...
2014 Sep 19
22
[PATCH v2 00/13] virt-resize: add support for resizing MBR logical partitions
...naligned logical partitions
3. extend the content of logical partitions
4. refactor to make logical partitions a seperate list
Hu Tao (13):
resize: convert sectsize to int64
add function div_roundup64
resize: introduce partition type
resize: introduce filter_part
resize: add function find_partition
resize: add function print_summmary
resize: expose loop to calculate new partitions' positions
resize: add function mbr_part_type
resize: add function copy_partition
resize: add function set_partition_bootable_and_id
resize: add function expand_partition_content
resize: add partit...
2015 Jun 03
13
[PATCH v3 00/11] virt-resize: add support for resizing MBR logical partitions
...flat list of logical partitions
- extended_partition
one MBR extended partition
2) reserve enough size when resizing logical partitions
Original patches by Hu Tao at:
https://www.redhat.com/archives/libguestfs/2014-October/msg00238.html
Chen Hanxiao (11):
resize: move loop check from find_partitions
resize: add logical_partitions and extended_partition
resize: calculate max alignment of logical partitions
resize: add support for logical partitions for calculate_surplus
resize: handle resize of logical partitions
resize: add support for logical partitions of
calculate_target_part...
2015 Jun 17
13
[PATCH v4 00/11] virt-resize: add support for resizing MBR logical partitions
...flat list of logical partitions
- extended_partition
one MBR extended partition
2) reserve enough size when resizing logical partitions
Original patches by Hu Tao at:
https://www.redhat.com/archives/libguestfs/2014-October/msg00238.html
Chen Hanxiao (11):
resize: move loop check from find_partitions
resize: add logical_partitions and extended_partition
resize: calculate max alignment of logical partitions
resize: add support for logical partitions for calculate_surplus
resize: handle resize of logical partitions
resize: add support for logical partitions of
calculate_target_part...