Skip to content

print friendly error message if btrfs tells us /dev/root was backing block device of root fs#16973

Merged
poettering merged 2 commits intosystemd:masterfrom
poettering:btrfs-dev-root
Sep 8, 2020
Merged

print friendly error message if btrfs tells us /dev/root was backing block device of root fs#16973
poettering merged 2 commits intosystemd:masterfrom
poettering:btrfs-dev-root

Conversation

@poettering
Copy link
Member

Prompted by #16953

@keszybz keszybz added the reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks label Sep 8, 2020
…ror message

On systems that boot without initrd on a btrfs root file systems the
BTRFS_IOC_DEV_INFO ioctl returns /dev/root as backing device. That
sucks, since that is not a real device visible to userspace.

Since this has been that way since forever, and it doesn't look like the
kernel will get fixed soon for this, let's at least generate a useful
error message in this case.

This is not a bug fix, just a tweak to make this more recognizable.

Once the kernel gets fixed to report the correct device nodes in this
case, in a way userspace can make sense of them things will magically
work for systemd, too.

(Note that this doesn't add a log message about this to really all cases
we call get_device() in, but just the main ones that are called in early
boot context, after all all there's no benefit in seeing this message
too many times.)

systemd#16953
https://bugs.freedesktop.org/show_bug.cgi?id=84689
https://bugzilla.kernel.org/show_bug.cgi?id=89721
…all cases

And add a comment for the existing cases where things aren't clear
already.
@poettering poettering removed the reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks label Sep 8, 2020
@poettering
Copy link
Member Author

Force pushed a new version. PTAL. Only the suggested changes.

@keszybz
Copy link
Member

keszybz commented Sep 8, 2020

LGTM.

@keszybz keszybz added the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label Sep 8, 2020
@poettering poettering merged commit a1447e7 into systemd:master Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

btrfs good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed tree-wide

Development

Successfully merging this pull request may close these issues.

gpt-auto-generator fails with BTRFS root and without initramfs

3 participants