diff options
author | Dan Williams <dan.j.williams@intel.com> | 2015-06-24 02:08:34 +0200 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2015-06-26 17:23:38 +0200 |
commit | 581388209405902b56d055f644b4dd124a206112 (patch) | |
tree | 2160b6616cf072396067ca654cd5231e139fc304 /drivers/acpi/numa.c | |
parent | pmem: flag pmem block devices as non-rotational (diff) | |
download | linux-581388209405902b56d055f644b4dd124a206112.tar.xz linux-581388209405902b56d055f644b4dd124a206112.zip |
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>
Diffstat (limited to 'drivers/acpi/numa.c')
0 files changed, 0 insertions, 0 deletions