Btrfs filesystems spanning more than one device (eg. RAID) require running `btrfs device scan` to initialize the kernel's knowledge of attached btrfs devices before `mount` can be executed successfully. This patch adds support for said command, in the spirit of eg. `dolvm` or `dozfs`. Reproducible: Always I have tested this patch on my machine and it seems to be working as expected.
Created attachment 409496 [details, diff] Patch implementing the requested behavior.
I spent a small amount of irc watching this unfold and this all looks good to me.
Note that this is similar to the behavior introduced in #303529, but that command (btrfsctl) has been deprecated. This version also improves on that patch by moving the behavior to the right place (startVolumes), making it configurable, auto-detecting btrfs rootfs and automatically including /sbin/btrfs in the initramfs. Unless somebody *really* still needs the deprecated btrfsctl variant, those lines should be removed.
Looks clean, well tested, added. https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=d41ebc4d721a8706d0b0f7c5cd1ed8dab42d667c Thanks hassn!