[Bug 1173239] New: command 'losetup -P' does not work in 15.2
http://bugzilla.opensuse.org/show_bug.cgi?id=1173239 Bug ID: 1173239 Summary: command 'losetup -P' does not work in 15.2 Classification: openSUSE Product: openSUSE Distribution Version: Leap 15.2 Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Kernel Assignee: kernel-bugs@opensuse.org Reporter: comes@naic.edu QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- I have a usb disk image on file with several partitions on it. Normally I would run: losetup -P -f --show usb.img and such command would attach the file usb.img to a loop device (/dev/loop0) and it would create also the devices /dev/loop0p1, /dev/loop0p<n> for each partition in the image file. Such command works in 15.1 but fails in 15.2. dmesg shows: loop_reread_partitions: partition scan of loop0 (usb.img) failed (rc=-16) Instead with the latest kernelstable installed losetup -P works as expected. I have found this 5.6.11 commit: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.6.y&id=17d02cdd39c9c58d890214f92b9899d600ecc087 I have applied such modification to the kernel 5.3.18-lp152.19 of 15.2 and I can confirm that such commit fixes the problem. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1173239 http://bugzilla.opensuse.org/show_bug.cgi?id=1173239#c3 --- Comment #3 from Giacomo Comes <comes@naic.edu> --- So, with the current 15.2 kernel "losetup -P" does not work, and the commit that fix the issue is is not needed. What's next? For the record here is the unneeded fix that I'm using. diff -Nraub linux.ori/block/partition-generic.c linux/block/partition-generic.c --- linux.ori/block/partition-generic.c 2020-06-09 16:59:24.000000000 -0400 +++ linux/block/partition-generic.c 2020-06-22 10:20:22.432854702 -0400 @@ -463,7 +463,7 @@ struct hd_struct *part; int res; - if (bdev->bd_part_count || bdev->bd_openers > 1) + if (bdev->bd_part_count) return -EBUSY; res = invalidate_partition(disk, 0); if (res) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1173239 http://bugzilla.opensuse.org/show_bug.cgi?id=1173239#c4 --- Comment #4 from Daniel Wagner <daniel.wagner@suse.com> --- (In reply to Giacomo Comes from comment #3)
So, with the current 15.2 kernel "losetup -P" does not work, and the commit that fix the issue is is not needed. What's next?
For the record here is the unneeded fix that I'm using.
Sorry for the confusion. We initially back ported the two patches which are invalid. Instead back porting the third patch to revert the first two, we just dropped the first two patches. The result should be same. That said, I don't know why the dropping of the two initial patches haven't made it yet to Leap 15.2. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1173239 http://bugzilla.opensuse.org/show_bug.cgi?id=1173239#c5 Michal Suchanek <msuchanek@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |msuchanek@suse.com Resolution|--- |FIXED Target Milestone|--- |Leap 15.2 --- Comment #5 from Michal Suchanek <msuchanek@suse.com> --- The fix is expected to make it into first Leap 15.2 MU, and should appear in the KOTD tomorrow https://build.opensuse.org/project/show/Kernel:openSUSE-15.2 Thanks -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com