[PATCH 2/3] libnvdimm, namespace_devs: add function nd_region_reset_ns_seed for namespace seed reset

2018-09-09 Thread Ocean He
From: Ocean He During runtime, if a namespace seed is used for new namespace creation but fail, then it needs to be reset for next namespace creation. Add function nd_region_reset_ns_seed for namespace seed reset and declare it in nd-core.h. Signed-off-by: Ocean He --- drivers/nvdimm/namespac

[PATCH 3/3] libnvdimm, region_devs: reset related seeds when fail to create namespace

2018-09-09 Thread Ocean He
From: Ocean He During runtime, namespace creation may fail if blocked by commit 15d36fecd0bdc7510b70 ("mm: disallow mappings that conflict for devm_memremap_pages()"). To ensure pfn_seed/dax_seed and namespace_seed are ready for next namespace creation, here to do detach and reset. Signed-off-by

[PATCH 1/3] libnvdimm, claim: remove static attribute of nd_detach_and_reset

2018-09-09 Thread Ocean He
From: Ocean He The function nd_detach_and_reset needs to be called externally, so remove the static attribute and declare it in nd-core.h. Signed-off-by: Ocean He --- drivers/nvdimm/claim.c | 2 +- drivers/nvdimm/nd-core.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/

[PATCH 0/3] libnvdimm: reset seeds for next namespace creation

2018-09-09 Thread Ocean He
From: Ocean He When pmem namespaces created are smaller than section size twice, the second creation would fail and meanwhile there is a kernel call trace which comes from commit 15d36fecd0bdc7510b70 ("mm: disallow mappings that conflict for devm_memremap_pages()"). [ cut here