On Fri, Jan 28, 2022 at 02:31:50PM -0700, Jane Chu wrote: > + if (!bad_pmem) { > write_pmem(pmem_addr, page, page_off, len); > + } else { > + rc = pmem_clear_poison(pmem, pmem_off, len); > + if (rc == BLK_STS_OK) > + write_pmem(pmem_addr, page, page_off, len); > + else > + pr_warn("%s: failed to clear poison\n", > + __func__); This warning probably needs ratelimiting. Also this flow looks a little odd. I'd redo the whole function with a clear bad_mem case: if (unlikely(is_bad_pmem(&pmem->bb, sector, len))) { blk_status_t rc = pmem_clear_poison(pmem, pmem_off, len); if (rc != BLK_STS_OK) { pr_warn("%s: failed to clear poison\n", __func__); return rc; } } flush_dcache_page(page); write_pmem(pmem_addr, page, page_off, len); return BLK_STS_OK; -- dm-devel mailing list dm-devel@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/dm-devel