[dm-devel] Partition size set to 0 when resizing extended and adding logical partition with BLKPG

Kai Lüke kailueke at riseup.net
Tue Apr 9 16:41:04 UTC 2019


Hello,

I write to you because I believe that the BLKPG ioctl misbehaves when an
existing extended MBR partition is changed and a logical partition added
in it.
Should I report like this or should I sign up for bugzilla.kernel.org?

The /sys/block/sdx/sdxY/size entry is set to 0 and even opening the
extended partition fails.
This leads to e.g. udevd failing to have access.
https://github.com/storaged-project/udisks/issues/425

To fix this situation from userspace, a BLKRRPART ioctl is needed.

To reproduce it, I attached a small program, which you can run on this
prepared image or on any drive with a single extended partition on it.

$ wget http://kailueke.spline.de/test.img
$ udisksctl loop-setup -f test.img

$ sudo ./sim loop0
new size in /sys/block/loop0/loop0p1/size: 0
issuing BLKRRPART
new size in /sys/block/loop0/loop0p1/size: 2


Do you think that this should be fixed in the kernel?
Regards,
Kai Lüke

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sim.c
Type: text/x-csrc
Size: 4517 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20190409/6e2391e6/attachment.bin>


More information about the dm-devel mailing list