Bug #5770
Add load_nvlist() error handling
100%
Description
Pull in the following patch from ZoL:
https://github.com/zfsonlinux/zfs/commit/c3275b5
commit c3275b56a1470ed255441df6ff105d0c3c095d8b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
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.
Updated by Joshua M. Clulow about 6 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) {
Updated by Electric Monk about 6 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>