Subject: bug#52125: bug: parted msdos type disk different from expect

From: lixiaokeng <[email-masked]>
Date: Fri, 26 Nov 2021 17:57:29 +0800

I parted a disk as:

parted /dev/sdb -s mklabel msdos
parted /dev/sdb -s mkpart primary 0cyl 64cyl

The expected result:
Number  Start   End    Size   Type     File system  Flags
 1      1049kB  526MB  525MB  primary

Fault result:
Warning: The resulting partition is not properly aligned for best performance: 1s % 2048s != 0s

Number  Start  End     Size    Type     File system  Flags
 1      512B   16.7MB  16.7MB  primary

The fault result is cause by commit 61dd3d4:
Use BLKSSZGET to get device sector size in _device_probe_geometry()