If Namespace label is present in LSA during nvdimm_probe() then DPA
reservation is required. But this reservation is not required by region
label. Therefore if LSA scanning finds any region label, skip it.

Signed-off-by: Neeraj Kumar <[email protected]>
---
 drivers/nvdimm/label.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/nvdimm/label.c b/drivers/nvdimm/label.c
index 6ccc51552822..e90e48672da3 100644
--- a/drivers/nvdimm/label.c
+++ b/drivers/nvdimm/label.c
@@ -469,6 +469,10 @@ int nd_label_reserve_dpa(struct nvdimm_drvdata *ndd)
                lsa_label = to_lsa_label(ndd, slot);
                nd_label = &lsa_label->ns_label;
 
+               /* Skip region label. DPA reservation is for NS label only */
+               if (is_region_label(ndd, lsa_label))
+                       continue;
+
                if (!slot_valid(ndd, lsa_label, slot))
                        continue;
 
-- 
2.34.1


Reply via email to