Project

General

Profile

Bug #5770

Add load_nvlist() error handling

Added by Matthew Ahrens over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
zfs - Zettabyte File System
Start date:
2015-03-28
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

Pull in the following patch from ZoL:

https://github.com/zfsonlinux/zfs/commit/c3275b5
commit c3275b56a1470ed255441df6ff105d0c3c095d8b
Author: Brian Behlendorf <>
Date: Fri Nov 30 11:23:38 2012 -0800
Add load_nvlist() error handling
Add the missing error handling to load_nvlist(). There's no good
reason this needs to be fatal. All callers of load_nvlist() do
correctly handle an error condition and it is preferable that an
error be returned. This will allow 'zpool import -FX' to safely
attempt to rollback through previous txgs looking for a good one.

History

#1

Updated by Joshua M. Clulow over 4 years ago

I think it would be better, as it is not really a boolean, to change it to an explicit non-zero check on the way in, i.e.

if (error != 0) {
#2

Updated by Electric Monk over 4 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit a45f1c3c5ee26f908655e7762d7e1e2aecdfefbc

commit  a45f1c3c5ee26f908655e7762d7e1e2aecdfefbc
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   2015-04-05T01:29:25.000Z

    5770 Add load_nvlist() error handling
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: George Wilson <george@delphix.com>
    Reviewed by: Prakash Surya <prakash.surya@delphix.com>
    Reviewed by: Richard Elling <richard.elling@richardelling.com>
    Reviewed by: Richard PALO <richard@NetBSD.org>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Also available in: Atom PDF