search for: p_target_end

Displaying 20 results from an estimated 40 matches for "p_target_end".

2015 May 18
2
[PATCH] resize: add sector size in debug_partition
...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 p.p_target_end; + printf "\tpartition sector data: %Ld-%Ld (%Ld sectors)\n" + (p.p_part.G.part_start /^ sectsize) (p.p_part.G.part_end /^ sectsize) + ((p.p_part.G.part_end -^ p.p_part.G.part_start) /^ sectsize +^ 1L); + printf "\ttarget partition sector data: %Ld-%Ld (%Ld sector...
2015 May 18
1
[PATCH v2] resize: add sector size in debug_partition
...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 p.p_target_end; + printf "\tpartition sector data: %Ld-%Ld (%Ld sectors)\n" + (p.p_part.G.part_start /^ sectsize) (p.p_part.G.part_end /^ sectsize) + ((p.p_part.G.part_end +^ 1L -^ p.p_part.G.part_start) /^ sectsize); + printf "\ttarget partition sector data: %Ld-%Ld (%Ld sector...
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
2014 Sep 22
1
Re: [PATCH v3 5/7] resize: add function mbr_part_type
...4l && x.p_type = ContentExtendedPartition then "extended" > + else "logical" in > + > (* Now partition the target disk. *) > List.iter ( > fun p -> > - g#part_add "/dev/sdb" "primary" p.p_target_start p.p_target_end > + g#part_add "/dev/sdb" (mbr_part_type p) p.p_target_start p.p_target_end > ) partitions; > > (* Copy over the data. *) I don't think the comment is true: $ guestfish -N disk -- \ part-init /dev/sda gpt : part-add /dev/sda...
2015 Mar 30
1
[PATCH RFC] resize: add p_mbr_p_type as member of type partition
.../resize/resize.ml index 84fd6d4..284d0e3 100644 --- a/resize/resize.ml +++ b/resize/resize.ml @@ -57,6 +57,7 @@ type partition = { p_target_partnum : int; (* TARGET partition number. *) p_target_start : int64; (* TARGET partition start (sector num). *) p_target_end : int64; (* TARGET partition end (sector num). *) + p_mbr_p_type : partition_type (* Partiton Type (master/extended/logical) *) } and partition_content = | ContentUnknown (* undetermined *) @@ -73,9 +74,11 @@ and partition_id = | No_ID...
2014 Sep 19
1
Re: [PATCH v2 08/13] resize: add function mbr_part_type
...= 4 && x.p_type = ContentExtendedPartition then "extended" > + else "logical" in > + > (* Now partition the target disk. *) > List.iter ( > fun p -> > - g#part_add "/dev/sdb" "primary" p.p_target_start p.p_target_end > + g#part_add "/dev/sdb" (mbr_part_type p) p.p_target_start p.p_target_end > ) partitions; The big problem with this is I think it doesn't work properly for GPT. GPT has no idea what "extended" is -- such a concept does not exist. So if you passed a G...
2015 May 18
0
Re: [PATCH] resize: add sector size in debug_partition
...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 p.p_target_end; > + printf "\tpartition sector data: %Ld-%Ld (%Ld sectors)\n" > + (p.p_part.G.part_start /^ sectsize) (p.p_part.G.part_end /^ sectsize) > + ((p.p_part.G.part_end -^ p.p_part.G.part_start) /^ sectsize +^ 1L); Although I think this gives the right answer, I thi...
2014 Jul 16
2
Re: virt-resize: support to MBR logical partitions and some question
...t; 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 `lsof'. Something like this: > > try > 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 &quo...
2014 Sep 22
0
[PATCH v3 7/7] resize: add support to resize logical partitions
...(* Start of next partition + alignment. *) @@ -1054,7 +1096,9 @@ read the man page virt-resize(1). eprintf "target partition %d: resize: newsize=%Ld start=%Ld end=%Ld\n%!" partnum newsize start (next -^ 1L); - { p with p_target_start = start; p_target_end = next -^ 1L; + (* there must be a at least 1-sector gap between logical + * partitions otherwise parted refused to add logical partition *) + { p with p_target_start = start; p_target_end = next -^ 2L; p_target_partnum = partnum } :: calculate_target_partit...
2014 Oct 08
0
[PATCH V5 2/4] resize: add support to resize logical partitions
...e in (* Start of next partition + alignment. *) @@ -1056,7 +1099,9 @@ read the man page virt-resize(1). eprintf "target partition %d: resize: newsize=%Ld start=%Ld end=%Ld\n%!" partnum newsize start (next -^ 1L); - { p with p_target_start = start; p_target_end = next -^ 1L; + (* there must be a at least 1-sector gap between logical + * partitions otherwise parted refused to add logical partition *) + { p with p_target_start = start; p_target_end = next -^ 2L; p_target_partnum = partnum } :: calculate_targ...
2014 Jul 15
2
Re: virt-resize: support to MBR logical partitions and some question
Hi Rich, On Wed, Jun 04, 2014 at 10:02:55AM +0100, Richard W.M. Jones wrote: > > On Wed, Jun 04, 2014 at 10:21:41AM +0800, Hu Tao wrote: > > Hi, > > > > I'm adding support to resizing logical partitions(patch is in progess). > > But encounter an error when adding a logical partition in dest image: > > > > virt-resize: libguestfs error: part_add:
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
0
[PATCH v3 4/7] resize: add function calculate_target_partitions
...t_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) next ps + p_target_partnum = partnum } :: calculate_target_partitions (partnum+1) next ~create_surplus ps | OpResize newsize -> (* resized partition *) (* New size in sectors. *...
2014 Sep 22
0
[PATCH v3 5/7] resize: add function mbr_part_type
...e if x.p_part.G.part_num <= 4l && x.p_type = ContentExtendedPartition then "extended" + else "logical" in + (* Now partition the target disk. *) List.iter ( fun p -> - g#part_add "/dev/sdb" "primary" p.p_target_start p.p_target_end + g#part_add "/dev/sdb" (mbr_part_type p) p.p_target_start p.p_target_end ) partitions; (* Copy over the data. *) -- 1.9.3
2014 Sep 26
0
[PATCH v4 3/7] resize: add function mbr_part_type
...e if x.p_part.G.part_num <= 4l && x.p_type = ContentExtendedPartition then "extended" + else "logical" in + (* Now partition the target disk. *) List.iter ( fun p -> - g#part_add "/dev/sdb" "primary" p.p_target_start p.p_target_end + g#part_add "/dev/sdb" (mbr_part_type p) p.p_target_start p.p_target_end ) partitions; (* Copy over the data. *) -- 1.9.3
2014 Sep 29
2
Re: [PATCH v4 3/7] resize: add function mbr_part_type
...4l && x.p_type = ContentExtendedPartition then "extended" > + else "logical" in > + > (* Now partition the target disk. *) > List.iter ( > fun p -> > - g#part_add "/dev/sdb" "primary" p.p_target_start p.p_target_end > + g#part_add "/dev/sdb" (mbr_part_type p) p.p_target_start p.p_target_end > ) partitions; > > (* Copy over the data. *) Thanks - I will push 01-03 shortly. I'm just looking at the remaining patches now. Rich. -- Richard Jones, Virtualization Gro...
2014 Sep 22
1
Re: [PATCH v3 3/7] resize: add function find_partitions
...o Extended Partition or Logical Partition. *) > + | PrimaryPartition -> > List.filter (fun p -> parttype <> MBR || p.G.part_num <= 4_l) > parts in > > @@ -485,11 +486,6 @@ read the man page virt-resize(1). > p_target_start = 0L; p_target_end = 0L } > ) parts in > > - if verbose then ( > - eprintf "%d partitions found\n" (List.length partitions); > - List.iter debug_partition partitions > - ); > - > (* Check content isn't larger than partitions. If it is then >...
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 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 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