From 753c38392ddff9d3cf140bb4d28f3bfba52c92d2 Mon Sep 17 00:00:00 2001 From: Matthew Ahrens Date: Sun, 23 Dec 2012 15:57:14 -0800 Subject: Illumos #3104: eliminate empty bpobjs 3104 eliminate empty bpobjs Reviewed by: George Wilson Reviewed by: Adam Leventhal Reviewed by: Christopher Siden Reviewed by: Garrett D'Amore Approved by: Eric Schrock References: illumos/illumos-gate@f17457368189aa911f774c38c1f21875a568bdca illumos changeset: 13782:8f78aae28a63 https://www.illumos.org/issues/3104 Ported-by: Brian Behlendorf --- module/zfs/zfeature.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'module/zfs/zfeature.c') diff --git a/module/zfs/zfeature.c b/module/zfs/zfeature.c index 24ff18fc3..c09b32d17 100644 --- a/module/zfs/zfeature.c +++ b/module/zfs/zfeature.c @@ -229,7 +229,12 @@ feature_get_refcount(objset_t *os, uint64_t read_obj, uint64_t write_obj, uint64_t refcount; uint64_t zapobj = feature->fi_can_readonly ? write_obj : read_obj; - ASSERT(0 != zapobj); + /* + * If the pool is currently being created, the feature objects may not + * have been allocated yet. Act as though all features are disabled. + */ + if (zapobj == 0) + return (ENOTSUP); err = zap_lookup(os, zapobj, feature->fi_guid, sizeof (uint64_t), 1, &refcount); -- cgit v1.2.3