Displaying 20 results from an estimated 29 matches for "debug_partit".
2015 May 14
1
[PATCH] resize: show sector infor in debug_partition
Show partition sector data and target partition sector data
in debug_partition.
Also, if --verbose, call debug_partition again before
parted partitions.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
---
resize/resize.ml | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/resize/resize.ml b/resize/resize.ml
index 8e69d44..ae...
2015 May 18
2
[PATCH] resize: add sector size in debug_partition
...gned-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
---
resize/resize.ml | 9 +++++----
1 file changed, 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_...
2015 May 18
1
[PATCH v2] resize: add sector size in debug_partition
....fujitsu.com>
---
v2: realign the position of '+^ 1'
resize/resize.ml | 9 +++++----
1 file changed, 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_...
2015 May 18
0
Re: [PATCH] resize: add sector size in debug_partition
...fujitsu.com>
> ---
> resize/resize.ml | 9 +++++----
> 1 file changed, 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 /^ se...
2014 Sep 22
0
[PATCH v3 6/7] resize: add partition type LogicalPartition
...++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/resize/resize.ml b/resize/resize.ml
index c56a91a..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 pa...
2014 Oct 08
0
[PATCH V5 1/4] resize: add partition type LogicalPartition
...++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/resize/resize.ml b/resize/resize.ml
index 2090675..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 pa...
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 3/7] resize: add function find_partitions
...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
> * something has gone wrong and we shouldn't continue. Old
> * virt-resize didn't do these checks.
> @@ -521,6 +517,13 @@ read the man page virt-resize(1).
&g...
2014 Sep 26
0
[PATCH v4 1/7] resize: add function find_partitions
...e/resize.ml b/resize/resize.ml
index 81bb270..cfd02fc 100644
--- a/resize/resize.ml
+++ b/resize/resize.ml
@@ -73,6 +73,9 @@ and partition_id =
| MBR_ID of int (* MBR ID. *)
| GPT_Type of string (* GPT UUID. *)
+type partition_type =
+ | PrimaryPartition
+
let rec debug_partition p =
eprintf "%s:\n" p.p_name;
eprintf "\tpartition data: %ld %Ld-%Ld (%Ld bytes)\n"
@@ -443,14 +446,15 @@ read the man page virt-resize(1).
| MBR_ID _ | GPT_Type _ | No_ID -> false
in
- let partitions : partition list =
+ let find_partitions part_type =...
2015 May 20
0
[PATCH v2 02/11] resize: add logical_partitions and extended_partition
...ical Partition. *)
+ List.filter (fun p -> parttype <> MBR || p.p_mbr_p_type <> LogicalPartition) partitions in
+
loop 0L partitions;
+ loop 0L logical_partitions;
if verbose () then (
printf "%d partitions found\n" (List.length partitions);
- List.iter (debug_partition ~sectsize) partitions
+ List.iter (debug_partition ~sectsize) partitions;
+ List.iter (debug_partition ~sectsize) logical_partitions;
+ if (List.length extended_partition_list) > 0 then
+ printf "%s is extended partition\n" extended_partition.p_name
);
(* Bui...
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 3/7] resize: add function find_partitions
...> 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
* something has gone wrong and we shouldn't continue. Old
* virt-resize didn't do these checks.
@@ -521,6 +517,13 @@ read the man page virt-resize(1).
partitions in
+ let pa...
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
2015 Mar 30
1
[PATCH RFC] resize: add p_mbr_p_type as member of type partition
...| No_ID (* No identifier. *)
| MBR_ID of int (* MBR ID. *)
| GPT_Type of string (* GPT UUID. *)
-
-type partition_type =
+and partition_type =
| PrimaryPartition
+ | ExtendedPartition
+ | LogicalPartition
+ | NoTypePartition
let rec debug_partition p =
printf "%s:\n" p.p_name;
@@ -99,7 +102,8 @@ let rec debug_partition p =
(match p.p_guid with
| Some guid -> guid
| None -> "(none)"
- )
+ );
+ printf "\tpartition type: %s\n" (string_of_partition_type p.p_mbr_p_type)
and string_of...
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 Feb 03
2
[PATCH] resize: properly restore GPT partition types
...l; (* 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 type and content size. *)
(* What we're going to do: *)
@@ -75,7 +76,14 @@ let rec debug_partition p =
p.p_part.G.part_size;
eprintf "\tbootable: %b\n" p.p_bootable;
eprintf "\tpartition ID: %s\n"
- (match p.p_mbr_id with None -> "(none)" | Some i -> sprintf "0x%x" i);
+ (match p.p_mbr_id, p.p_gpt_type with
+ | None, None ->...
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