Print this page
*** NO COMMENTS ***

*** 285,294 **** --- 285,295 ---- } void ddt_phys_fill(ddt_phys_t *ddp, const blkptr_t *bp) { + ASSERT(ddp != NULL); ASSERT(ddp->ddp_phys_birth == 0); for (int d = 0; d < SPA_DVAS_PER_BP; d++) ddp->ddp_dva[d] = bp->blk_dva[d]; ddp->ddp_phys_birth = BP_PHYSICAL_BIRTH(bp);
*** 295,318 **** --- 296,328 ---- } void ddt_phys_clear(ddt_phys_t *ddp) { + ASSERT(ddp != NULL); + if (ddp) { bzero(ddp, sizeof (*ddp)); + } } void ddt_phys_addref(ddt_phys_t *ddp) { + ASSERT(ddp != NULL); + if (ddp) { ddp->ddp_refcnt++; + } } void ddt_phys_decref(ddt_phys_t *ddp) { + // ASSERT(ddp != NULL); + if (ddp) { ASSERT((int64_t)ddp->ddp_refcnt > 0); ddp->ddp_refcnt--; + } } void ddt_phys_free(ddt_t *ddt, ddt_key_t *ddk, ddt_phys_t *ddp, uint64_t txg) {
*** 331,340 **** --- 341,357 ---- for (int p = 0; p < DDT_PHYS_TYPES; p++, ddp++) { if (DVA_EQUAL(BP_IDENTITY(bp), &ddp->ddp_dva[0]) && BP_PHYSICAL_BIRTH(bp) == ddp->ddp_phys_birth) return (ddp); } + (void) printf("ddt_phys_select() found nothing for " + "DVA[BP]=<%llu:%llx:%llx> and phys_birth[BP]=%llu\n", + (u_longlong_t)DVA_GET_VDEV(BP_IDENTITY(bp)), + (u_longlong_t)DVA_GET_OFFSET(BP_IDENTITY(bp)), + (u_longlong_t)DVA_GET_ASIZE(BP_IDENTITY(bp)), + (u_longlong_t)BP_PHYSICAL_BIRTH(bp) + ); return (NULL); } uint64_t ddt_phys_total_refcnt(const ddt_entry_t *dde)