Ross Zwisler 546eb0317c libnvdimm, pmem: Do not flush power-fail protected CPU caches
This commit:

5fdf8e5ba566 ("libnvdimm: re-enable deep flush for pmem devices via fsync()")

intended to make sure that deep flush was always available even on
platforms which support a power-fail protected CPU cache.  An unintended
side effect of this change was that we also lost the ability to skip
flushing CPU caches on those power-fail protected CPU cache.

Fix this by skipping the low level cache flushing in dax_flush() if we have
CPU caches which are power-fail protected.  The user can still override this
behavior by manually setting the write_cache state of a namespace.  See
libndctl's ndctl_namespace_write_cache_is_enabled(),
ndctl_namespace_enable_write_cache() and
ndctl_namespace_disable_write_cache() functions.

Cc: <stable@vger.kernel.org>
Fixes: 5fdf8e5ba566 ("libnvdimm: re-enable deep flush for pmem devices via fsync()")
Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2018-06-06 11:02:32 -07:00
..
2018-06-03 12:49:15 -07:00
2018-05-24 08:53:20 -07:00
2018-04-19 15:11:50 -07:00
2018-04-04 20:07:20 -07:00
2018-03-27 09:51:22 +02:00
2018-04-09 11:42:31 -07:00
2018-04-04 20:07:20 -07:00
2018-04-05 14:27:02 -07:00
2018-05-24 14:12:05 -07:00
2018-05-22 13:48:34 -04:00
2018-04-07 12:08:19 -07:00
2018-05-18 10:10:43 -07:00
2018-04-18 23:37:25 -04:00
2018-05-24 14:12:05 -07:00
2018-04-04 20:07:20 -07:00
2018-05-07 05:33:29 -10:00
2018-04-04 20:07:20 -07:00
2018-04-05 21:29:35 -07:00
2018-04-05 21:21:08 -07:00
2018-04-05 21:21:08 -07:00
2018-04-13 15:46:21 -07:00
2018-05-21 17:39:32 -07:00
2018-05-24 08:53:20 -07:00
2018-05-24 14:12:05 -07:00
2018-04-06 19:44:27 -07:00
2018-04-10 10:20:00 -07:00
2018-04-11 18:58:27 -07:00
2018-03-29 13:38:10 +03:00