lkml.org 
[lkml]   [2022]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectNew partition on loop device doesn't appear in /dev anymore with kernel 5.17.0 and newer (repro script included)
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
[unhandled content-type:application/x-shellscript]
\
 
 \ /
  Last update: 2022-06-03 14:49    [W:1.099 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site