All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG? NVME Linux-4.15] Dracut loops indefinitely with 4.15
@ 2018-02-15 13:49 Julien Durillon
  2018-02-15 20:19 ` Keith Busch
  0 siblings, 1 reply; 3+ messages in thread
From: Julien Durillon @ 2018-02-15 13:49 UTC (permalink / raw)
  To: linux-kernel

Hi there,

I opened an issue here:
https://github.com/dracutdevs/dracut/issues/373 for dracut. You can
read there how dracuts enters an infinite loop.

TL;DR: in linux-4.14, trying to find the last "slave" of /dev/dm-0
ends with a maj:min of "249:0" which does not exist in /sys/dev/block.
In linux-4.15, the same thing loops as "249:0" exists.

## My configuration

I'm using a nvme ssd disk named "nvme0n1". It has two partitions: an
EFI one and a luks encrypted btrfs volume. So in /dev I have /dev/dm-0
that is referenced to by /dev/mapper/root.
/dev/mapper/root -> /dev/dm-0 is the mapped un-encrypted
"/dev/nvme0n1p2" volume used as a btrfs volume.

## My problem

*Before* linux-4.15, `stat /dev/dm-0` displays:

  File: /dev/dm-0
  Size: 0               Blocks: 0          IO Block: 4096   block special file
Device: 6h/6d   Inode: 2768        Links: 1     Device type: fa,0
Access: (0660/brw-rw----)  Uid: (    0/    root)   Gid: (    6/    disk)
Access: 2018-02-12 17:49:46.020513274 +0100
Modify: 2018-02-12 17:49:46.020513274 +0100
Change: 2018-02-12 17:49:46.020513274 +0100
Birth: -

So the device type is "fa,0", which is translated by dracut as "250:0".

*Starting at* linux-4.15, `stat /dev/dm-0` displays:

  File: /dev/dm-0
  Size: 0               Blocks: 0          IO Block: 4096   block special file
Device: 6h/6d   Inode: 17795       Links: 1     Device type: f9,0
Access: (0660/brw-rw----)  Uid: (    0/    root)   Gid: (    6/    disk)
Access: 2018-02-15 14:38:56.570529189 +0100
Modify: 2018-02-15 14:38:56.570529189 +0100
Change: 2018-02-15 14:38:56.570529189 +0100
 Birth: -

So the device type is "f9,0", which is translated by dracut as "249:0".

I'm posting it here because I don't understand why the kernel changed
the device type. Is it intended?

Regards,
-- 
Julien Durillon

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

* Re: [BUG? NVME Linux-4.15] Dracut loops indefinitely with 4.15
  2018-02-15 13:49 [BUG? NVME Linux-4.15] Dracut loops indefinitely with 4.15 Julien Durillon
@ 2018-02-15 20:19 ` Keith Busch
  2018-02-15 21:42   ` Julien Durillon
  0 siblings, 1 reply; 3+ messages in thread
From: Keith Busch @ 2018-02-15 20:19 UTC (permalink / raw)
  To: Julien Durillon; +Cc: linux-kernel

On Thu, Feb 15, 2018 at 02:49:56PM +0100, Julien Durillon wrote:
> I opened an issue here:
> https://github.com/dracutdevs/dracut/issues/373 for dracut. You can
> read there how dracuts enters an infinite loop.
> 
> TL;DR: in linux-4.14, trying to find the last "slave" of /dev/dm-0
> ends with a maj:min of "249:0" which does not exist in /sys/dev/block.
> In linux-4.15, the same thing loops as "249:0" exists.

The problem is dracut assumes the 'dev' file for an nvme namespace's
parent device contains a maj:min for a block device. It's actually a
character device, and its maj:min happens to also be be the same as the
device mapper's block device.

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

* Re: [BUG? NVME Linux-4.15] Dracut loops indefinitely with 4.15
  2018-02-15 20:19 ` Keith Busch
@ 2018-02-15 21:42   ` Julien Durillon
  0 siblings, 0 replies; 3+ messages in thread
From: Julien Durillon @ 2018-02-15 21:42 UTC (permalink / raw)
  To: Keith Busch; +Cc: linux-kernel

2018-02-15 21:19 GMT+01:00 Keith Busch <keith.busch@intel.com>:
> The problem is dracut assumes the 'dev' file for an nvme namespace's
> parent device contains a maj:min for a block device. It's actually a
> character device, and its maj:min happens to also be be the same as the
> device mapper's block device.

So dracut should see that it's a character device and not a block device?

-- 
Julien Durillon

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

end of thread, other threads:[~2018-02-15 21:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-15 13:49 [BUG? NVME Linux-4.15] Dracut loops indefinitely with 4.15 Julien Durillon
2018-02-15 20:19 ` Keith Busch
2018-02-15 21:42   ` Julien Durillon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.