[SRU][M,J][PATCH 0/1] partproke is broken on empty loopback device

Roxana Nicolescu roxana.nicolescu at canonical.com
Wed Jan 31 12:43:23 UTC 2024


BugLink: https://bugs.launchpad.net/bugs/2049689

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.

Li Lingfeng (1):
  block: Move checking GENHD_FL_NO_PART to bdev_add_partition()

 block/ioctl.c           | 2 --
 block/partitions/core.c | 5 +++++
 2 files changed, 5 insertions(+), 2 deletions(-)

-- 
2.34.1




More information about the kernel-team mailing list