[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1296674576.21750944003001.JavaMail.epsvc@epcpadp1new>
Date: Thu, 26 Jun 2025 15:28:15 +0530
From: Neeraj Kumar <s.neeraj@...sung.com>
To: Jonathan Cameron <Jonathan.Cameron@...wei.com>
Cc: dan.j.williams@...el.com, dave@...olabs.net, dave.jiang@...el.com,
alison.schofield@...el.com, vishal.l.verma@...el.com, ira.weiny@...el.com,
a.manzanares@...sung.com, nifan.cxl@...il.com, anisa.su@...sung.com,
vishak.g@...sung.com, krish.reddy@...sung.com, arun.george@...sung.com,
alok.rathore@...sung.com, neeraj.kernel@...il.com,
linux-kernel@...r.kernel.org, linux-cxl@...r.kernel.org,
nvdimm@...ts.linux.dev, gost.dev@...sung.com, cpgs@...sung.com
Subject: Re: [RFC PATCH 07/20] nvdimm/namespace_label: Update namespace
init_labels and its region_uuid
On 23/06/25 10:11AM, Jonathan Cameron wrote:
>On Tue, 17 Jun 2025 18:09:31 +0530
>Neeraj Kumar <s.neeraj@...sung.com> wrote:
>
>> nd_mapping->labels maintains the list of labels present into LSA.
>> init_labels function prepares this list while adding new label
>
>init_labels() prepares
>
Thanks, Will fix it up
>
>> into LSA and updates nd_mapping->labels accordingly. During cxl
>> region creation nd_mapping->labels list and LSA was updated with
>> one region label. Therefore during new namespace label creation
>> pre-include the previously created region label, so increase
>> num_labels count by 1.
>>
>> Also updated nsl_set_region_uuid with region uuid with which
>> namespace is associated with.
>>
>> Signed-off-by: Neeraj Kumar <s.neeraj@...sung.com>
>> ---
>> drivers/nvdimm/label.c | 5 +++--
>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/nvdimm/label.c b/drivers/nvdimm/label.c
>> index 9381c50086fc..108100c4bf44 100644
>> --- a/drivers/nvdimm/label.c
>> +++ b/drivers/nvdimm/label.c
>> @@ -947,7 +947,7 @@ static int __pmem_label_update(struct nd_region *nd_region,
>> nsl_set_slot(ndd, ns_label, slot);
>> nsl_set_alignment(ndd, ns_label, 0);
>> nsl_set_type_guid(ndd, ns_label, &nd_set->type_guid);
>> - nsl_set_region_uuid(ndd, ns_label, NULL);
>> + nsl_set_region_uuid(ndd, ns_label, &nd_set->uuid);
>> nsl_set_claim_class(ndd, ns_label, ndns->claim_class);
>> nsl_calculate_checksum(ndd, ns_label);
>> nd_dbg_dpa(nd_region, ndd, res, "\n");
>> @@ -1114,7 +1114,8 @@ int nd_pmem_namespace_label_update(struct nd_region *nd_region,
>> count++;
>> WARN_ON_ONCE(!count);
>>
>> - rc = init_labels(nd_mapping, count);
>> + /* Adding 1 to pre include the already added region label */
>> + rc = init_labels(nd_mapping, count + 1);
>> if (rc < 0)
>> return rc;
>>
>
Powered by blists - more mailing lists