]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
libnvdimm, pmem: use nvdimm_flush() for namespace I/O writes
authorDan Williams <dan.j.williams@intel.com>
Thu, 2 Jun 2016 06:14:22 +0000 (23:14 -0700)
committerDan Williams <dan.j.williams@intel.com>
Tue, 12 Jul 2016 22:13:48 +0000 (15:13 -0700)
nsio_rw_bytes() is used to write info block metadata to the namespace,
so it should trigger a flush after every write.  Replace wmb_pmem() with
nvdimm_flush() in this path.

Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/claim.c

index 9997ff94a13232128e17a6e45964ac75ffd7555f..d5dc80c48b4cb36a55c54a2383ce9812ae068260 100644 (file)
@@ -240,7 +240,7 @@ static int nsio_rw_bytes(struct nd_namespace_common *ndns,
                return memcpy_from_pmem(buf, nsio->addr + offset, size);
        } else {
                memcpy_to_pmem(nsio->addr + offset, buf, size);
-               wmb_pmem();
+               nvdimm_flush(to_nd_region(ndns->dev.parent));
        }
 
        return 0;