mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
Add ddt_object_load() error handling
Add the missing error handling to ddt_object_load(). There's no good reason this needs to be fatal. 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>
This commit is contained in:
parent
10be533e33
commit
2a4a9dc2f0
@ -120,7 +120,9 @@ ddt_object_load(ddt_t *ddt, enum ddt_type type, enum ddt_class class)
|
|||||||
/*
|
/*
|
||||||
* Seed the cached statistics.
|
* Seed the cached statistics.
|
||||||
*/
|
*/
|
||||||
VERIFY(ddt_object_info(ddt, type, class, &doi) == 0);
|
error = ddt_object_info(ddt, type, class, &doi);
|
||||||
|
if (error)
|
||||||
|
return (error);
|
||||||
|
|
||||||
ddo->ddo_count = ddt_object_count(ddt, type, class);
|
ddo->ddo_count = ddt_object_count(ddt, type, class);
|
||||||
ddo->ddo_dspace = doi.doi_physical_blocks_512 << 9;
|
ddo->ddo_dspace = doi.doi_physical_blocks_512 << 9;
|
||||||
|
Loading…
Reference in New Issue
Block a user