kernel_optimize_test/drivers/nvdimm
Dan Williams 5813882094 libnvdimm, nfit: handle unarmed dimms, mark namespaces read-only
Upon detection of an unarmed dimm in a region, arrange for descendant
BTT, PMEM, or BLK instances to be read-only.  A dimm is primarily marked
"unarmed" via flags passed by platform firmware (NFIT).

The flags in the NFIT memory device sub-structure indicate the state of
the data on the nvdimm relative to its energy source or last "flush to
persistence".  For the most part there is nothing the driver can do but
advertise the state of these flags in sysfs and emit a message if
firmware indicates that the contents of the device may be corrupted.
However, for the case of ACPI_NFIT_MEM_ARMED, the driver can arrange for
the block devices incorporating that nvdimm to be marked read-only.
This is a safe default as the data is still available and new writes are
held off until the administrator either forces read-write mode, or the
energy source becomes armed.

A 'read_only' attribute is added to REGION devices to allow for
overriding the default read-only policy of all descendant block devices.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2015-06-26 11:23:38 -04:00
..
blk.c libnvdimm, nfit: handle unarmed dimms, mark namespaces read-only 2015-06-26 11:23:38 -04:00
btt_devs.c libnvdimm, btt: add support for blk integrity 2015-06-26 11:23:38 -04:00
btt.c libnvdimm, nfit: handle unarmed dimms, mark namespaces read-only 2015-06-26 11:23:38 -04:00
btt.h libnvdimm, blk: add support for blk integrity 2015-06-26 11:23:38 -04:00
bus.c libnvdimm, nfit: handle unarmed dimms, mark namespaces read-only 2015-06-26 11:23:38 -04:00
core.c libnvdimm: enable iostat 2015-06-26 11:23:38 -04:00
dimm_devs.c libnvdimm, nfit, nd_blk: driver for BLK-mode access persistent memory 2015-06-26 11:23:38 -04:00
dimm.c libnvdimm: pmem label sets and namespace instantiation. 2015-06-24 21:24:10 -04:00
Kconfig libnvdimm, nfit, nd_blk: driver for BLK-mode access persistent memory 2015-06-26 11:23:38 -04:00
label.c libnvdimm: infrastructure for btt devices 2015-06-25 04:20:04 -04:00
label.h libnvdimm: write blk label set 2015-06-24 21:24:10 -04:00
Makefile libnvdimm, nfit, nd_blk: driver for BLK-mode access persistent memory 2015-06-26 11:23:38 -04:00
namespace_devs.c libnvdimm, blk: add support for blk integrity 2015-06-26 11:23:38 -04:00
nd-core.h libnvdimm, nfit, nd_blk: driver for BLK-mode access persistent memory 2015-06-26 11:23:38 -04:00
nd.h libnvdimm, nfit: handle unarmed dimms, mark namespaces read-only 2015-06-26 11:23:38 -04:00
pmem.c libnvdimm, nfit: handle unarmed dimms, mark namespaces read-only 2015-06-26 11:23:38 -04:00
region_devs.c libnvdimm, nfit: handle unarmed dimms, mark namespaces read-only 2015-06-26 11:23:38 -04:00
region.c libnvdimm, nfit, nd_blk: driver for BLK-mode access persistent memory 2015-06-26 11:23:38 -04:00