summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2012-07-19 14:50:25 -0700
committerBrian Behlendorf <[email protected]>2012-07-20 10:36:21 -0700
commit2a4a9dc2f09d7672268af4a4f70e1a26b481b5e9 (patch)
tree2cf5c8b23244c0e35751dd526d7ac5e465dd4b47
parent10be533e3344f523e1b8d6ab4f0658897a95ac02 (diff)
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 <[email protected]>
-rw-r--r--module/zfs/ddt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/zfs/ddt.c b/module/zfs/ddt.c
index 7279f1d5d..18c6cef5a 100644
--- a/module/zfs/ddt.c
+++ b/module/zfs/ddt.c
@@ -120,7 +120,9 @@ ddt_object_load(ddt_t *ddt, enum ddt_type type, enum ddt_class class)
/*
* 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_dspace = doi.doi_physical_blocks_512 << 9;