Thank you Stefan!
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/2049689
Title:
partprobe is broken on empty loopback device
Status in linux package in Ubuntu:
Invalid
Status in linux source package in Jammy:
Fix Released
Status in linux source package in Mantic:
Fix Released
Bug description:
SRU Justification:
[Impact]
* BLKPG_DEL_PARTITION on an empty loopback device used to return ENXIO
but now returns EINVAL, breaking partprobe due to commit
"block: don't add or resize partition on the disk with GENHD_FL_NO_PART"
introduced in mantic 6.5.0-17 and jammy 5.15.0-94.
[Fix]
* backport commit
"block: Move checking GENHD_FL_NO_PART to bdev_add_partition()"
[Test Plan]
* dd if=/dev/zero of=/tmp/foo bs=1M count=50
* partprobe $(losetup --find --show /tmp/foo)
Before the fix this fails.
After the fix it should work.
[Where problems could occur]
* We may see issues on disk partitions operations.
Old description:
This is with the kernel from jammy-proposed (linux-image-5.15.0-94-generic
5.15.0-94.104).
Do this:
# dd if=/dev/zero of=/tmp/file bs=1M count=50
# partprobe "$(losetup --show --find /tmp/file)"
Notice this very odd error message:
Error: Partition(s) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 on
/dev/loop2 have been written, but we have been unable to inform the
kernel of the change, probably because it/they are in use. As a
result, the old partition(s) will remain in use. You should reboot
now before making further changes.
That's a result of an ioctl changing its error code in an incompatible
way between kernel versions 5.15.0.91.88 and 5.15.0.94.91, confusing
partprobe.
5.15.0.91.88:
ioctl(3, BLKPG, {op=BLKPG_DEL_PARTITION, flags=0, datalen=152, data={start=0,
length=0, pno=1, devname="", volname=""}}) = -1 ENXIO (No such device or
address)
5.15.0.94.91:
ioctl(3, BLKPG, {op=BLKPG_DEL_PARTITION, flags=0, datalen=152, data={start=0,
length=0, pno=1, devname="", volname=""}}) = -1 EINVAL (Invalid argument)
This is a userspace API break which impacts GNU parted and util-linux
(as confirmed by the util-linux maintainer).
This issue was discovered as part of Cockpit CI here:
https://github.com/cockpit-project/bots/pull/5793
This issue is being discussed on LKML here (with a patch likely to
land soon): https://lkml.org/lkml/2024/1/15/147
lsb_release -rd:
Description: Ubuntu 22.04.3 LTS
Release: 22.04
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2049689/+subscriptions
--
Mailing list: https://launchpad.net/~kernel-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~kernel-packages
More help : https://help.launchpad.net/ListHelp