search for: p_part

Displaying 20 results from an estimated 50 matches for "p_part".

2015 May 18
2
[PATCH] resize: add sector size in debug_partition
...ed, 5 insertions(+), 4 deletions(-) diff --git a/resize/resize.ml b/resize/resize.ml index 4e58e84..21bba63 100644 --- a/resize/resize.ml +++ b/resize/resize.ml @@ -81,10 +81,11 @@ let rec debug_partition ?(sectsize=512L) p = printf "\tpartition data: %ld %Ld-%Ld (%Ld bytes)\n" p.p_part.G.part_num p.p_part.G.part_start p.p_part.G.part_end p.p_part.G.part_size; - printf "\tpartition sector data: %Ld-%Ld\n" - (p.p_part.G.part_start /^ sectsize) (p.p_part.G.part_end /^ sectsize); - printf "\ttarget partition sector data: %Ld-%Ld \n" - p.p_target_start...
2015 May 18
1
[PATCH v2] resize: add sector size in debug_partition
...ed, 5 insertions(+), 4 deletions(-) diff --git a/resize/resize.ml b/resize/resize.ml index 4e58e84..602a583 100644 --- a/resize/resize.ml +++ b/resize/resize.ml @@ -81,10 +81,11 @@ let rec debug_partition ?(sectsize=512L) p = printf "\tpartition data: %ld %Ld-%Ld (%Ld bytes)\n" p.p_part.G.part_num p.p_part.G.part_start p.p_part.G.part_end p.p_part.G.part_size; - printf "\tpartition sector data: %Ld-%Ld\n" - (p.p_part.G.part_start /^ sectsize) (p.p_part.G.part_end /^ sectsize); - printf "\ttarget partition sector data: %Ld-%Ld \n" - p.p_target_start...
2015 May 18
0
Re: [PATCH] resize: add sector size in debug_partition
...> diff --git a/resize/resize.ml b/resize/resize.ml > index 4e58e84..21bba63 100644 > --- a/resize/resize.ml > +++ b/resize/resize.ml > @@ -81,10 +81,11 @@ let rec debug_partition ?(sectsize=512L) p = > printf "\tpartition data: %ld %Ld-%Ld (%Ld bytes)\n" > p.p_part.G.part_num p.p_part.G.part_start p.p_part.G.part_end > p.p_part.G.part_size; > - printf "\tpartition sector data: %Ld-%Ld\n" > - (p.p_part.G.part_start /^ sectsize) (p.p_part.G.part_end /^ sectsize); > - printf "\ttarget partition sector data: %Ld-%Ld \n" &...
2015 May 14
1
[PATCH] resize: show sector infor in debug_partition
...e.ml +++ b/resize/resize.ml @@ -80,11 +80,15 @@ and partition_type = | LogicalPartition | NoTypePartition -let rec debug_partition p = +let rec debug_partition ?(sectsize=512L) p = printf "%s:\n" p.p_name; printf "\tpartition data: %ld %Ld-%Ld (%Ld bytes)\n" p.p_part.G.part_num p.p_part.G.part_start p.p_part.G.part_end p.p_part.G.part_size; + printf "\tpartition sector data: %Ld-%Ld\n" + (p.p_part.G.part_start /^ sectsize) (p.p_part.G.part_end /^ sectsize); + printf "\ttarget partition sector data: %Ld-%Ld \n" + p.p_target_start...
2014 Jul 16
2
Re: virt-resize: support to MBR logical partitions and some question
...g#part_add "/dev/sdb" (mbr_part_type p) p.p_target_start p.p_target_end; > if p.p_type = ContentExtendedPartition then > List.iter ( > fun p -> > g#part_add "/dev/sdb" "logical" p.p_target_start p.p_target_end > ) p.p_partitions > with > G.Error msg -> > eprintf "lsof:\n---\n%s\n---\n" (g#debug "sh" [| "lsof" |]); > eprintf "original error:\n" msg; > exit 1 > > This should tell you which processes have partitions open, which >...
2014 Oct 08
0
[PATCH V5 3/4] resize: support resize extended partition
...rt-resize(1). start_overhead_sects +^ alignment_sects +^ gpt_end_sects in sectsize *^ overhead_sects in + let required_logical = List.fold_left ( + fun total p -> + let newsize = + match p.p_operation with + | OpCopy | OpIgnore -> roundup64 p.p_part.G.part_size (alignment *^ sectsize) + | OpDelete -> 0L + | OpResize newsize -> roundup64 newsize (alignment *^ sectsize) in + total +^ newsize + ) 0L logical_partitions in + let required_logical = required_logical +^ alignment *^ sectsize in + let required_ex...
2014 Oct 08
0
[PATCH V5 2/4] resize: add support to resize logical partitions
...t count extended partition but logical partitions below, + * because we may extend and resize logical partitions at + * the same time. *) + if p.p_type = ContentExtendedPartition then 0L else + match p.p_operation with + | OpCopy | OpIgnore -> p.p_part.G.part_size + | OpDelete -> 0L + | OpResize newsize -> newsize in + total +^ newsize + ) 0L partitions in + let required = required +^ List.fold_left ( + fun total p -> + let newsize = match p.p_operation with | OpCopy |...
2014 Oct 08
6
[PATCH V5 0/4] virt-resize: add support for resizing logical
...t logical partitions and extended partition changes to v3: 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 logic...
2015 May 20
15
[PATCH v2 00/11] virt-resize: add support for resizing MBR logical partitions
In current virt-resize, only primary partitions(including extended partition) are supported. They are collected in an array for resize operations. Logical partitions are not supported. This series add support for resizing logical partitions. v2: 1) Add 3 variables to describe relationship of logical and extended partitions: - partitions flat list of primary partitions (as now, the global
2014 Feb 03
2
[PATCH] resize: properly restore GPT partition types
...1060404. --- resize/resize.ml | 46 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/resize/resize.ml b/resize/resize.ml index 8683df7..a2670e5 100644 --- a/resize/resize.ml +++ b/resize/resize.ml @@ -48,6 +48,7 @@ type partition = { p_part : G.partition; (* SOURCE partition data from libguestfs. *) p_bootable : bool; (* Is it bootable? *) p_mbr_id : int option; (* MBR ID, if it has one. *) + p_gpt_type : string option; (* GPT ID, if it has one. *) p_type : partition_content; (* Content typ...
2015 Jun 03
13
[PATCH v3 00/11] virt-resize: add support for resizing MBR logical partitions
In current virt-resize, only primary partitions(including extended partition) are supported. They are collected in an array for resize operations. Logical partitions are not supported. This series add support for resizing logical partitions. v3: 1) rewrite partitions/logical_partitions/extended_partition section by the comments from Rich and Pino. 2) in 03/11 introduce logical_align for
2015 Jun 17
13
[PATCH v4 00/11] virt-resize: add support for resizing MBR logical partitions
In current virt-resize, only primary partitions(including extended partition) are supported. They are collected in an array for resize operations. Logical partitions are not supported. This series add support for resizing logical partitions. v4: rebase on upstream. v3: 1) rewrite partitions/logical_partitions/extended_partition section by the comments from Rich and Pino. 2) in 03/11
2015 Jul 06
13
[PATCH rebase v4 00/11] virt-resize: add support for resizing MBR logical partitions
In current virt-resize, only primary partitions(including extended partition) are supported. They are collected in an array for resize operations. Logical partitions are not supported. This series add support for resizing logical partitions. v4: rebase on upstream. v3: 1) rewrite partitions/logical_partitions/extended_partition section by the comments from Rich and Pino. 2) in 03/11
2014 Sep 22
0
[PATCH v3 7/7] resize: add support to resize logical partitions
...t count extended partition but logical partitions below, + * because we may extend and resize logical partitions at + * the same time. *) + if p.p_type = ContentExtendedPartition then 0L else + match p.p_operation with + | OpCopy | OpIgnore -> p.p_part.G.part_size + | OpDelete -> 0L + | OpResize newsize -> newsize in + total +^ newsize + ) 0L partitions in + let required = required +^ List.fold_left ( + fun total p -> + let newsize = match p.p_operation with | OpCopy |...
2014 Oct 30
8
[PATCH v5 REBASE 0/4] virt-resize: add support for resizing logical
...t logical partitions and extended partition changes to v3: 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 logic...
2014 Sep 19
22
[PATCH v2 00/13] virt-resize: add support for resizing MBR logical partitions
Hi Rich, This is v2 series to add support for resizing MBR logical partitions. I found the reason of problem in v1 that parted reports error when adding logical partitions, is that logical partitions are not aligned to 2 sectors. This problem doesn't appear in v2. This is for early review, because of: 1. I'm not sure the splitting of patches is appropriate or not, but it's much
2014 Sep 22
1
Re: [PATCH v3 5/7] resize: add function mbr_part_type
...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" > + else if x.p_part.G.part_num <= 4l && x.p_type = ContentExtendedPartition then "extended" > + else "logical" in > + > (* Now partition the target...
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 logi...
2014 Sep 19
1
Re: [PATCH v2 08/13] resize: add function mbr_part_type
...a/resize/resize.ml > +++ b/resize/resize.ml > @@ -50,6 +50,7 @@ type partition = { > p_id : partition_id; (* Partition (MBR/GPT) ID. *) > p_type : partition_content; (* Content type and content size. *) > p_label : string option; (* Label/name. *) > + p_part_num: int; (* partition number *) I don't think it's necessary to store p_part_num in the main partitions struct. Instead you can get to the partition number using: p.p_part.G.part_num For example, mbr_part_type could be written: let mbr_part_type x = if x.p_part.G...
2014 Sep 26
0
[RFC PATCH v4 7/7] resize: support resize extended partition
...rt-resize(1). start_overhead_sects +^ alignment_sects +^ gpt_end_sects in sectsize *^ overhead_sects in + let required_logical = List.fold_left ( + fun total p -> + let newsize = + match p.p_operation with + | OpCopy | OpIgnore -> roundup64 p.p_part.G.part_size (alignment *^ sectsize) + | OpDelete -> 0L + | OpResize newsize -> roundup64 newsize (alignment *^ sectsize) in + total +^ newsize + ) 0L logical_partitions in + let required_extended = List.fold_left ( + fun total p -> + let newsize =...