linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* New partition on loop device doesn't appear in /dev anymore with kernel 5.17.0 and newer (repro script included)
@ 2022-06-03 12:46 Michael Schaller
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Schaller @ 2022-06-03 12:46 UTC (permalink / raw)
  To: axboe; +Cc: hch, linux-block, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 1651 bytes --]

Dear maintainer,

Since kernel 5.17.0 it appears that creating a partition on a loop
device doesn't automatically create the corresponding /dev/loop#p#
entry anymore. We rolled back to kernel 5.16.18, which doesn't have
this issue. I also tested kernel 5.18.1 and it is affected as well.

I've attached repro.sh, which is a Bash script that reproduces the
issue (tested on Debian testing). The script only requires standard
Linux tools (including GNU Parted). The script creates a raw disk
image file (sparse), associates the file with a loop device and
partitions the loop device so that it only contains an ESP. At this
point there should be a /dev/loop#p1 entry so that the following
mkfs.vfat can create the filesystem for the ESP. However on kernel
5.17.0 and newer /dev/loop#p1 isn't created and mkfs.vfat fails with
"No such file or directory". Furthermore on kernel 5.17.0 and newer we
see the following error in the kernel log: "I/O error, dev loop#,
sector 32640 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0"

I also did a kernel bisect against the vanilla stable kernels and that
revealed commit 1ebe2e5f9d68e94c524aba876f27b945669a7879 as the first
problematic commit. I've cc'ed the commit author as well.

This issue is also tracked on the Debian side with
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1012298.

Best,

Michael Schaller
Site Reliability Engineer - Software Engineer
misch@google.com

Google Germany GmbH
Erika-Mann-Straße 33
80636 München

Geschäftsführer: Paul Manicle, Liana Sebastian
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

[-- Attachment #2: repro.sh --]
[-- Type: application/x-shellscript, Size: 1043 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-06-21  7:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CALt099+y4-kJ0OqVeKaAjAbs4inOkR-WE0FmyiJRDc1-Ev9UKw@mail.gmail.com>
2022-06-03 12:49 ` New partition on loop device doesn't appear in /dev anymore with kernel 5.17.0 and newer (repro script included) Christoph Hellwig
2022-06-03 13:21   ` Michael Schaller
2022-06-03 13:23     ` Christoph Hellwig
2022-06-05 10:00       ` Salvatore Bonaccorso
2022-06-06  7:49         ` Christoph Hellwig
2022-06-09  4:27     ` Christoph Hellwig
2022-06-09  7:10       ` Michael Schaller
2022-06-21  7:55         ` Michael Schaller
2022-06-03 12:46 Michael Schaller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).