Signed-off-by: Chen Hanxiao <chenhanxiao(a)cn.fujitsu.com>
---
resize/resize.ml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/resize/resize.ml b/resize/resize.ml
index 218eb44..12bc8e9 100644
--- a/resize/resize.ml
+++ b/resize/resize.ml
@@ -520,8 +520,9 @@ read the man page virt-resize(1).
(* Check partitions don't overlap. *)
let rec loop end_of_prev = function
| [] -> ()
- | { p_name = name; p_part = { G.part_start = part_start } } :: _
- when end_of_prev > part_start ->
+ (* skip logical partitions overlap check for it's inside extended partition *)
+ | { p_name = name; p_part = { G.part_start = part_start }; p_mbr_p_type =
p_mbr_part_type } :: _
+ when p_mbr_part_type <> LogicalPartition && end_of_prev >
part_start ->
error (f_"%s: this partition overlaps the previous one") name
| { p_part = { G.part_end = part_end } } :: parts -> loop part_end parts
in
--
2.1.0