]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
libnvdimm: re-enable deep flush for pmem devices via fsync()
authorDave Jiang <dave.jiang@intel.com>
Sat, 3 Mar 2018 03:31:40 +0000 (19:31 -0800)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Mon, 19 Mar 2018 23:40:22 +0000 (20:40 -0300)
commit2b7bf2f5f5a98d40006cc545878ce81b4122b6d3
tree5b035e8ec06566f702f849bdec18c8b9f257bfaf
parente8278366ae736603ecc37b39e9a13c680f653376
libnvdimm: re-enable deep flush for pmem devices via fsync()

BugLink: http://bugs.launchpad.net/bugs/1730829
Re-enable deep flush so that users always have a way to be sure that a
write makes it all the way out to media. Writes from the PMEM driver
always arrive at the NVDIMM since movnt is used to bypass the cache, and
the driver relies on the ADR (Asynchronous DRAM Refresh) mechanism to
flush write buffers on power failure. The Deep Flush mechanism is there
to explicitly write buffers to protect against (rare) ADR failure.  This
change prevents a regression in deep flush behavior so that applications
can continue to depend on fsync() as a mechanism to trigger deep flush
in the filesystem-DAX case.

Fixes: 06e8ccdab15f4 ("acpi: nfit: Add support for detect platform CPU cache...")
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
(cherry picked from commit 5fdf8e5ba5666fe153bd61f851a40078a6347822)
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/nvdimm/pmem.c