aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nd.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2021-03-09 17:43:38 -0800
committerDan Williams <dan.j.williams@intel.com>2021-04-08 22:18:36 -0700
commit2361db89aaadfb671db6911b0063e01ec8922c28 (patch)
tree52602a2ca144d07620370d0f3fd4672a91702c13 /include/linux/nd.h
parentLinux 5.12-rc6 (diff)
downloadlinux-dev-2361db89aaadfb671db6911b0063e01ec8922c28.tar.xz
linux-dev-2361db89aaadfb671db6911b0063e01ec8922c28.zip
libnvdimm: Notify disk drivers to revalidate region read-only
Previous kernels allowed the BLKROSET to override the disk's read-only status. With that situation fixed the pmem driver needs to rely on notification events to reevaluate the disk read-only status after the host region has been marked read-write. Recall that when libnvdimm determines that the persistent memory has lost persistence (for example lack of energy to flush from DRAM to FLASH on an NVDIMM-N device) it marks the region read-only, but that state can be overridden by the user via: echo 0 > /sys/bus/nd/devices/regionX/read_only ...to date there is no notification that the region has restored persistence, so the user override is the only recovery. Fixes: 52f019d43c22 ("block: add a hard-readonly flag to struct gendisk") Reported-by: kernel test robot <lkp@intel.com> Reported-by: Vishal Verma <vishal.l.verma@intel.com> Tested-by: Vishal Verma <vishal.l.verma@intel.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Cc: Christoph Hellwig <hch@lst.de> Cc: Ming Lei <ming.lei@redhat.com> Cc: Martin K. Petersen <martin.petersen@oracle.com> Cc: Hannes Reinecke <hare@suse.de> Cc: Jens Axboe <axboe@kernel.dk> Link: https://lore.kernel.org/r/161534060720.528671.2341213328968989192.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'include/linux/nd.h')
-rw-r--r--include/linux/nd.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/nd.h b/include/linux/nd.h
index cec526c8043d..ee9ad76afbba 100644
--- a/include/linux/nd.h
+++ b/include/linux/nd.h
@@ -11,6 +11,7 @@
enum nvdimm_event {
NVDIMM_REVALIDATE_POISON,
+ NVDIMM_REVALIDATE_REGION,
};
enum nvdimm_claim_class {