Project

General

Profile

Actions

Bug #9423

closed

loader: zfs_bootfs() needs to use config pool txg for boot device

Added by Toomas Soome over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
bootloader
Start date:
2018-03-29
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

The current implementation to pass zpool details to kernel is checking vdev state, however, it is not enough to check the state to get the "good" boot device. The kernel itself is implementing txg check to pick up the best device and will fail to boot when we attempt to boot from some other device. See also the check at: http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/fs/zfs/spa.c#4977

For solution, record the pointer to best vdev (leaf device) into spa while building the pool config, and then we can greatly simplify the zfs_bootfs().

Actions #1

Updated by Electric Monk over 5 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit 45137058c754e4417a4b9610ef655bc26b175a31

commit  45137058c754e4417a4b9610ef655bc26b175a31
Author: Toomas Soome <tsoome@me.com>
Date:   2018-04-23T16:15:40.000Z

    9423 loader: zfs_bootfs() needs to use config pool txg for boot device
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
    Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>

Actions

Also available in: Atom PDF