curtin-dev team mailing list archive
-
curtin-dev team
-
Mailing list archive
-
Message #01353
Re: [Merge] ~mwhudson/curtin:lp-1878041 into curtin:master
I'm happy with this cleanup, thanks. It looks like there were two issues, first we'd timeout on enumerating the maps and the DM_NAME cleans that up nicely. The second was dealing with multipath disks (dm-X) with 4K sector sizes. Could you mention that in the commit message as well.
Some inline comments/requests as well.
Diff comments:
> diff --git a/curtin/commands/block_meta.py b/curtin/commands/block_meta.py
> index e29c1e4..5557e7d 100644
> --- a/curtin/commands/block_meta.py
> +++ b/curtin/commands/block_meta.py
> @@ -692,6 +692,10 @@ def calc_partition_info(disk, partition, logical_block_size_bytes):
> if partition.startswith('dm-'):
> pp = partition
> pp_start_sec, pp_size_sec = calc_dm_partition_info(partition)
> + if pp_start_sec is not None:
> + pp_start_sec //= logical_block_size_bytes // 512
> + if pp_start_sec is not None:
> + pp_size_sec //= logical_block_size_bytes // 512
Good catch. This hunk could be moved outside of the if/else block; we read either dm_partition size or sysfs version; then this block runs to convert to sectors.
> else:
> pp = os.path.join(disk, partition)
> # XXX: sys/block/X/{size,start} is *ALWAYS* in 512b value
--
https://code.launchpad.net/~mwhudson/curtin/+git/curtin/+merge/396538
Your team curtin developers is requested to review the proposed merge of ~mwhudson/curtin:lp-1878041 into curtin:master.
References