]> git.ipfire.org Git - thirdparty/dracut.git/commit
fix(90kernel-modules): MMC and NVMe on kernels 6.0+
authorMikhail Novosyolov <m.novosyolov@rosalinux.ru>
Sat, 3 Dec 2022 16:56:38 +0000 (19:56 +0300)
committerLaszlo Gombos <laszlo.gombos@gmail.com>
Mon, 19 Dec 2022 12:53:15 +0000 (07:53 -0500)
commite0d57a8f5b15847a7fbae2ed3df29ec2c5d25ec7
tree451a5d8ad87fdc135d351f69d363c13f6549f22a
parent28f37724441a0d63fb1505deefbf5d4838b9818c
fix(90kernel-modules): MMC and NVMe on kernels 6.0+

Commit 6f8191fdf41 ("block: simplify disk shutdown") in Linux kernels 6.0 and above
renamed blk_cleanup_disk to blk_mq_destroy_queue. Adapt code to handle both cases.

Because of this the kernel module mmc_block.ko was not included into initrd on kernel 6.1:
dracut-install: No symbol or path match for '/lib/modules/6.1.0-generic-0.rc7.1rosa2021.1-x86_64//kernel/drivers/mmc/core/mmc_block.ko.zst
while on kernel 5.15 it was included:
dracut-install: Handling /lib/modules/5.15.79-generic-1rosa2021.1-x86_64//kernel/drivers/mmc/core/mmc_block.ko.zst
dracut-install: Module mmc_block: symbol blk_cleanup_queue matched inclusion filter

It made booting OS from root on /dev/mmcblk* impossible.

Just adding blk_mq_destroy_queue was not enough to make mmc_block.ko be included into initrd
(maybe because call of blk_cleanup_disk() was removed and call of blk_mq_destroy_queue() was not added).
So also adding blk_mq_alloc_request which is used from mmc_block.

Fixes: https://github.com/dracutdevs/dracut/issues/2102
modules.d/90kernel-modules/module-setup.sh