]> git.proxmox.com Git - mirror_zfs.git/blobdiff - module/zfs/bpobj.c
Illumos #3464
[mirror_zfs.git] / module / zfs / bpobj.c
index 1920da4408c8c5c4de83666d56045f213bc20a63..4ba9f8002e2d6671df7518e0cec300423cbc82cc 100644 (file)
@@ -366,6 +366,7 @@ bpobj_enqueue_subobj(bpobj_t *bpo, uint64_t subobj, dmu_tx_t *tx)
 {
        bpobj_t subbpo;
        uint64_t used, comp, uncomp, subsubobjs;
+       ASSERTV(dmu_object_info_t doi);
 
        ASSERT(bpo->bpo_havesubobj);
        ASSERT(bpo->bpo_havecomp);
@@ -392,6 +393,9 @@ bpobj_enqueue_subobj(bpobj_t *bpo, uint64_t subobj, dmu_tx_t *tx)
                    DMU_OT_BPOBJ_SUBOBJ, SPA_MAXBLOCKSIZE, DMU_OT_NONE, 0, tx);
        }
 
+       ASSERT0(dmu_object_info(bpo->bpo_os, bpo->bpo_phys->bpo_subobjs, &doi));
+       ASSERT3U(doi.doi_type, ==, DMU_OT_BPOBJ_SUBOBJ);
+
        mutex_enter(&bpo->bpo_lock);
        dmu_write(bpo->bpo_os, bpo->bpo_phys->bpo_subobjs,
            bpo->bpo_phys->bpo_num_subobjs * sizeof (subobj),