Displaying 20 results from an estimated 32 matches for "opcopy".
2014 Sep 22
0
[PATCH v3 7/7] resize: add support to resize logical partitions
...e =
+ (* don'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 w...
2014 Oct 08
0
[PATCH V5 2/4] resize: add support to resize logical partitions
...e =
+ (* don'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 w...
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
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 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
2014 Oct 08
0
[PATCH V5 3/4] resize: support resize extended partition
...9,12 +749,33 @@ read the man page virt-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...
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
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 Jul 16
2
Re: virt-resize: support to MBR logical partitions and some question
On Tue, Jul 15, 2014 at 09:01:47AM +0100, Richard W.M. Jones wrote:
> The answer is I don't know. But there are a few things you can try:
>
> (1) Most importantly, enable tracing (export LIBGUESTFS_TRACE=1) and
> get a list of operations that are performed in the order they are
> performed. This is vital for debugging this.
>
> (2) When the error happens, run
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
2015 May 20
0
[PATCH v2 04/11] resize: add support for logical partitions for calculate_surplus
...the man page virt-resize(1).
let required = List.fold_left (
fun total p ->
let newsize =
+ (* size of extended partition is calculated seperately *)
+ 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 w...
2014 Sep 26
0
[RFC PATCH v4 7/7] resize: support resize extended partition
...49,6 +749,24 @@ read the man page virt-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...
2015 May 28
2
Re: [PATCH v2 04/11] resize: add support for logical partitions for calculate_surplus
...let required = List.fold_left (
> fun total p ->
> let newsize =
> + (* size of extended partition is calculated seperately *)
> + 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...
2014 Sep 08
3
Re: [RFC PATCH] resize: add support for MBR logical partitions some question
...***\n\n";
> printf "Summary of changes:\n\n";
>
> - List.iter (
> - fun ({ p_name = name; p_part = { G.part_size = oldsize }} as p) ->
> + let rec print_summary p =
> let text =
> match p.p_operation with
> | OpCopy ->
> - sprintf (f_"%s: This partition will be left alone.") name
> + sprintf (f_"%s: This partition will be left alone.") p.p_name
> | OpIgnore ->
> - sprintf (f_"%s: This partition will be created, but the...
2018 Jan 10
0
[PATCH 3/3] resize: copy GPT partition flags
...502,7 +509,7 @@ read the man page virt-resize(1).
{ p_name = name; p_part = part;
p_bootable = bootable; p_id = id; p_type = typ;
- p_label = label; p_guid = guid;
+ p_label = label; p_guid = guid; p_attributes = attributes;
p_operation = OpCopy; p_target_partnum = 0;
p_target_start = 0L; p_target_end = 0L }
) parts in
@@ -1150,6 +1157,7 @@ read the man page virt-resize(1).
part_size = 0L };
p_bootable = false; p_id = No_ID; p_type = ContentUnknown;
p_label = None; p_guid = No...
2018 Jan 15
0
[PATCH v2 3/3] resize: copy GPT partition flags
...502,7 +509,7 @@ read the man page virt-resize(1).
{ p_name = name; p_part = part;
p_bootable = bootable; p_id = id; p_type = typ;
- p_label = label; p_guid = guid;
+ p_label = label; p_guid = guid; p_attributes = attributes;
p_operation = OpCopy; p_target_partnum = 0;
p_target_start = 0L; p_target_end = 0L }
) parts in
@@ -1150,6 +1157,7 @@ read the man page virt-resize(1).
part_size = 0L };
p_bootable = false; p_id = No_ID; p_type = ContentUnknown;
p_label = None; p_guid = No...
2014 Feb 04
0
[PATCH 3/3] resize: preserve GPT partition names (RHBZ#1060404).
...n
+ let label =
+ try Some (g#part_get_name "/dev/sda" part_num)
+ with G.Error _ -> None in
{ p_name = name; p_part = part;
p_bootable = bootable; p_id = id; p_type = typ;
+ p_label = label;
p_operation = OpCopy; p_target_partnum = 0;
p_target_start = 0L; p_target_end = 0L }
) parts in
@@ -1040,6 +1050,7 @@ read the man page virt-resize(1).
p_part = { G.part_num = 0l; part_start = 0L; part_end = 0L;
part_size = 0L };
p_bootable = false;...
2014 Sep 22
0
[PATCH v3 4/7] resize: add function calculate_target_partitions
...rget_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 -> (* same size *)
(* Size in sectors. *)
@@ -1037,7 +1036,7 @@ read the man page virt-resize(1).
partnum start (end_ -^ 1L);
{ p with p_target_start = start; p_target_end = end_ -^ 1L;
- p_target_partnum = partnum } :: loop (partnum+1)...