search for: calculate_target_partitions

Displaying 20 results from an estimated 26 matches for "calculate_target_partitions".

2014 Sep 22
0
[PATCH v3 4/7] resize: add function calculate_target_partitions
...00644 --- a/resize/resize.ml +++ b/resize/resize.ml @@ -1019,11 +1019,10 @@ read the man page virt-resize(1). * the final list just contains partitions that need to be created * on the target. *) - let partitions = - let rec loop partnum start = function + let rec calculate_target_partitions partnum start ~create_surplus = function | p :: ps -> (match p.p_operation with - | OpDelete -> loop partnum start ps (* skip p *) + | OpDelete -> calculate_target_partitions partnum start ~create_surplus ps (* skip p *) | OpIgnore | OpCopy ->...
2014 Sep 22
13
[PATCH v3 0/7] add support to resize MBR logical partitions
Hi Rich, This is v3 series to add support for resizing MBR logical partitions. changes to v2: 1. remove p_part_num 2. remove filter_parts 3. name the function calculate_target_partitions 4. remove the code to restart guest introduced in v2 changes to v1: 1. spit the patches so it's 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...
2015 Jun 03
13
[PATCH v3 00/11] virt-resize: add support for resizing MBR logical partitions
...k 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_partitions resize: calculate_target_partitions for logical partitions resize: parted and copy logical partitions resize: more misc ops on logical partition resize: add support resize extended partition resize: test: add support for resizing extended and logical partitions resize/resize.ml...
2015 Jun 17
13
[PATCH v4 00/11] virt-resize: add support for resizing MBR logical partitions
...k 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_partitions resize: calculate_target_partitions for logical partitions resize: parted and copy logical partitions resize: more misc ops on logical partition resize: add support resize extended partition resize: test: add support for resizing extended and logical partitions resize/resize.ml...
2015 Jul 06
13
[PATCH rebase v4 00/11] virt-resize: add support for resizing MBR logical partitions
...k 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_partitions resize: calculate_target_partitions for logical partitions resize: parted and copy logical partitions resize: more misc ops on logical partition resize: add support resize extended partition resize: test: add support for resizing extended and logical partitions resize/resize.ml...
2014 Sep 22
0
[PATCH v3 7/7] resize: add support to resize logical partitions
...esize(1). wrap ~indent:4 (text ^ "\n\n") in List.iter print_summary partitions; + List.iter print_summary logical_partitions; List.iter ( fun ({ lv_name = name } as lv) -> @@ -1030,6 +1070,7 @@ read the man page virt-resize(1). | OpDelete -> calculate_target_partitions partnum start ~create_surplus ps (* skip p *) | OpIgnore | OpCopy -> (* same size *) + let start = roundup64 start 2L in (* Size in sectors. *) let size = div_roundup64 p.p_part.G.part_size sectsize in (* Start of next partition + ali...
2014 Oct 08
0
[PATCH V5 2/4] resize: add support to resize logical partitions
...e man page virt-resize(1). wrap ~indent:4 (text ^ "\n\n") in List.iter print_summary partitions; + List.iter print_summary logical_partitions; List.iter ( fun ({ lv_name = name } as lv) -> @@ -1031,6 +1072,7 @@ read the man page virt-resize(1). calculate_target_partitions partnum start ~create_surplus ps (* skip p *) | OpIgnore | OpCopy -> (* same size *) + let start = roundup64 start 2L in (* Size in sectors. *) let size = div_roundup64 p.p_part.G.part_size sectsize in (* Start of next partition + alignment....
2015 May 20
15
[PATCH v2 00/11] virt-resize: add support for resizing MBR logical partitions
...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_target_partitions resize: calculate_target_partitions for logical partitions resize: parted and copy logical partitions resize: more misc ops on logical partition resize: add support resize extended partition resize: test: add support for resizing extended and logical partitions resize/resize.ml...
2014 Oct 08
6
[PATCH V5 0/4] virt-resize: add support for resizing logical
...1. merge patch 1 and patch 3 in v3 2. let mbr_part_type return 'primary' for GPT partitions 3. add test for resizing logical partitions 4. fix extending the extended partition (yet). see patch 7. changes to v2: 1. remove p_part_num 2. remove filter_parts 3. name the function calculate_target_partitions 4. remove the code to restart guest introduced in v2 changes to v1: 1. spit the patches so it's 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 (...
2014 Oct 30
8
[PATCH v5 REBASE 0/4] virt-resize: add support for resizing logical
...1. merge patch 1 and patch 3 in v3 2. let mbr_part_type return 'primary' for GPT partitions 3. add test for resizing logical partitions 4. fix extending the extended partition (yet). see patch 7. changes to v2: 1. remove p_part_num 2. remove filter_parts 3. name the function calculate_target_partitions 4. remove the code to restart guest introduced in v2 changes to v1: 1. spit the patches so it's 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...
2015 Jun 16
0
Re: [PATCH v3 00/11] virt-resize: add support for resizing MBR logical 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_partitions > resize: calculate_target_partitions for logical partitions > resize: parted and copy logical partitions > resize: more misc ops on logical partition > resize: add support resize extended partition > resize: test: add support for resizing extended and logical partitions &g...
2015 Jun 24
0
Re: [PATCH v4 00/11] virt-resize: add support for resizing MBR logical 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_partitions > resize: calculate_target_partitions for logical partitions > resize: parted and copy logical partitions > resize: more misc ops on logical partition > resize: add support resize extended partition > resize: test: add support for resizing extended and logical partitions &g...
2015 Jul 08
0
Re: [PATCH rebase v4 00/11] virt-resize: add support for resizing MBR logical 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_partitions > resize: calculate_target_partitions for logical partitions > resize: parted and copy logical partitions > resize: more misc ops on logical partition > resize: add support resize extended partition > resize: test: add support for resizing extended and logical partitions &g...
2014 Sep 22
1
Re: [PATCH v3 5/7] resize: add function mbr_part_type
...nged, 8 insertions(+), 1 deletion(-) > > diff --git a/resize/resize.ml b/resize/resize.ml > index 8b43306..c56a91a 100644 > --- a/resize/resize.ml > +++ b/resize/resize.ml > @@ -1091,10 +1091,17 @@ read the man page virt-resize(1). > > calculate_target_partitions 1 start ~create_surplus:true partitions in > > + (* For GPT, the part type simply becomes partition name, so we don't > + * handle the case specifically. *) > + let mbr_part_type x = > + if x.p_part.G.part_num <= 4l && x.p_type <> ContentExtendedPartitio...
2014 Sep 26
9
[PATCH v4 0/7] virt-resize: add support for resizing logical partitions
...1. merge patch 1 and patch 3 in v3 2. let mbr_part_type return 'primary' for GPT partitions 3. add test for resizing logical partitions 4. fix extending the extended partition (yet). see patch 7. changes to v2: 1. remove p_part_num 2. remove filter_parts 3. name the function calculate_target_partitions 4. remove the code to restart guest introduced in v2 changes to v1: 1. spit the patches so it's 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 (...
2015 May 14
1
[PATCH] resize: show sector infor in debug_partition
...%d partitions found\n" (List.length partitions); - List.iter debug_partition partitions + List.iter (debug_partition ~sectsize:sectsize) partitions ); (* Build a data structure describing LVs on the source disk. *) @@ -1119,6 +1123,11 @@ read the man page virt-resize(1). calculate_target_partitions 1 start ~create_surplus:true partitions in + if verbose then ( + printf "After calculate target partitions:\n"; + List.iter (debug_partition ~sectsize:sectsize) partitions + ); + let mbr_part_type x = match parttype, x.p_part.G.part_num <= 4_l, x.p_type with (* f...
2014 Sep 22
0
[PATCH v3 5/7] resize: add function mbr_part_type
.../resize.ml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/resize/resize.ml b/resize/resize.ml index 8b43306..c56a91a 100644 --- a/resize/resize.ml +++ b/resize/resize.ml @@ -1091,10 +1091,17 @@ read the man page virt-resize(1). calculate_target_partitions 1 start ~create_surplus:true partitions in + (* For GPT, the part type simply becomes partition name, so we don't + * handle the case specifically. *) + let mbr_part_type x = + if x.p_part.G.part_num <= 4l && x.p_type <> ContentExtendedPartition then "primary&quot...
2014 Sep 26
0
[PATCH v4 3/7] resize: add function mbr_part_type
.../resize.ml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/resize/resize.ml b/resize/resize.ml index b52af83..f1861d9 100644 --- a/resize/resize.ml +++ b/resize/resize.ml @@ -1094,10 +1094,17 @@ read the man page virt-resize(1). calculate_target_partitions 1 start ~create_surplus:true partitions in + let mbr_part_type x = + (* for GPT, all partitions are regarded as Primary Partition. *) + if parttype = GPT then "primary" + else if x.p_part.G.part_num <= 4l && x.p_type <> ContentExtendedPartition then "prim...
2014 Oct 21
0
Re: [PATCH V5 0/4] virt-resize: add support for resizing logical
...t; 2. let mbr_part_type return 'primary' for GPT partitions > 3. add test for resizing logical partitions > 4. fix extending the extended partition (yet). see patch 7. > > changes to v2: > 1. remove p_part_num > 2. remove filter_parts > 3. name the function calculate_target_partitions > 4. remove the code to restart guest introduced in v2 > > changes to v1: > 1. spit the patches so it's 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 p...
2014 Sep 29
2
Re: [PATCH v4 3/7] resize: add function mbr_part_type
...nged, 8 insertions(+), 1 deletion(-) > > diff --git a/resize/resize.ml b/resize/resize.ml > index b52af83..f1861d9 100644 > --- a/resize/resize.ml > +++ b/resize/resize.ml > @@ -1094,10 +1094,17 @@ read the man page virt-resize(1). > > calculate_target_partitions 1 start ~create_surplus:true partitions in > > + let mbr_part_type x = > + (* for GPT, all partitions are regarded as Primary Partition. *) > + if parttype = GPT then "primary" > + else if x.p_part.G.part_num <= 4l && x.p_type <> ContentExtended...