mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
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. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #1120
This commit is contained in:
parent
c372b36e3e
commit
c3275b56a1
@ -1350,7 +1350,10 @@ load_nvlist(spa_t *spa, uint64_t obj, nvlist_t **value)
|
||||
int error;
|
||||
*value = NULL;
|
||||
|
||||
VERIFY(0 == dmu_bonus_hold(spa->spa_meta_objset, obj, FTAG, &db));
|
||||
error = dmu_bonus_hold(spa->spa_meta_objset, obj, FTAG, &db);
|
||||
if (error)
|
||||
return (error);
|
||||
|
||||
nvsize = *(uint64_t *)db->db_data;
|
||||
dmu_buf_rele(db, FTAG);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user