Consider namespace with size as active namespace
diff mbox series

Message ID 20190807043915.30239-1-aneesh.kumar@linux.ibm.com
State New
Headers show
Series
  • Consider namespace with size as active namespace
Related show

Commit Message

Aneesh Kumar K.V Aug. 7, 2019, 4:39 a.m. UTC
This enables us to mark a namespace as disabled due to pfn_sb
mismatch. We have pending kernel patches at that will mark the
namespace disabled when the PAGE_SIZE or struct page size didn't
match with the value stored in pfn_sb.

We need to make sure we don't use this disabled namespace as seed namespace
for new namespace creation.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
 ndctl/namespace.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Verma, Vishal L Oct. 16, 2019, 10:31 p.m. UTC | #1
On Wed, 2019-08-07 at 10:09 +0530, Aneesh Kumar K.V wrote:
> This enables us to mark a namespace as disabled due to pfn_sb
> mismatch. We have pending kernel patches at that will mark the
> namespace disabled when the PAGE_SIZE or struct page size didn't
> match with the value stored in pfn_sb.
> 
> We need to make sure we don't use this disabled namespace as seed namespace
> for new namespace creation.
> 
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
> ---
>  ndctl/namespace.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/ndctl/namespace.c b/ndctl/namespace.c
> index 58a9e3c53474..1f212a2b3a9b 100644
> --- a/ndctl/namespace.c
> +++ b/ndctl/namespace.c
> @@ -455,7 +455,8 @@ static int is_namespace_active(struct ndctl_namespace *ndns)
>  	return ndns && (ndctl_namespace_is_enabled(ndns)
>  		|| ndctl_namespace_get_pfn(ndns)
>  		|| ndctl_namespace_get_dax(ndns)
> -		|| ndctl_namespace_get_btt(ndns));
> +		|| ndctl_namespace_get_btt(ndns)
> +		|| ndctl_namespace_get_size(ndns));
>  }
>  
>  /*

Hi Aneesh,

I was going through pending ndctl patches and found this - this seems to
break some of the unit tests. Also, have the relevant kernel patches
been posted?

The failing unit tests are sector-mode.sh and dax.sh

	-Vishal
Aneesh Kumar K.V Oct. 17, 2019, 3:05 a.m. UTC | #2
On 10/17/19 4:01 AM, Verma, Vishal L wrote:
> On Wed, 2019-08-07 at 10:09 +0530, Aneesh Kumar K.V wrote:
>> This enables us to mark a namespace as disabled due to pfn_sb
>> mismatch. We have pending kernel patches at that will mark the
>> namespace disabled when the PAGE_SIZE or struct page size didn't
>> match with the value stored in pfn_sb.
>>
>> We need to make sure we don't use this disabled namespace as seed namespace
>> for new namespace creation.
>>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
>> ---
>>   ndctl/namespace.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/ndctl/namespace.c b/ndctl/namespace.c
>> index 58a9e3c53474..1f212a2b3a9b 100644
>> --- a/ndctl/namespace.c
>> +++ b/ndctl/namespace.c
>> @@ -455,7 +455,8 @@ static int is_namespace_active(struct ndctl_namespace *ndns)
>>   	return ndns && (ndctl_namespace_is_enabled(ndns)
>>   		|| ndctl_namespace_get_pfn(ndns)
>>   		|| ndctl_namespace_get_dax(ndns)
>> -		|| ndctl_namespace_get_btt(ndns));
>> +		|| ndctl_namespace_get_btt(ndns)
>> +		|| ndctl_namespace_get_size(ndns));
>>   }
>>   
>>   /*
> 
> Hi Aneesh,
> 
> I was going through pending ndctl patches and found this - this seems to
> break some of the unit tests. Also, have the relevant kernel patches
> been posted?

Yes. The required changes in kernel got merged as part of

commit 1c97afa714098aab2ca588cc654f8ff67dd46dcb
Author: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Date:   Thu Sep 5 21:15:58 2019 +0530

     libnvdimm/pmem: Advance namespace seed for specific probe errors


> 
> The failing unit tests are sector-mode.sh and dax.sh
> 

I will see if i can run them on ppc64. We still had issues in getting 
ndctl check to be running on ppc64.

-aneesh

Patch
diff mbox series

diff --git a/ndctl/namespace.c b/ndctl/namespace.c
index 58a9e3c53474..1f212a2b3a9b 100644
--- a/ndctl/namespace.c
+++ b/ndctl/namespace.c
@@ -455,7 +455,8 @@  static int is_namespace_active(struct ndctl_namespace *ndns)
 	return ndns && (ndctl_namespace_is_enabled(ndns)
 		|| ndctl_namespace_get_pfn(ndns)
 		|| ndctl_namespace_get_dax(ndns)
-		|| ndctl_namespace_get_btt(ndns));
+		|| ndctl_namespace_get_btt(ndns)
+		|| ndctl_namespace_get_size(ndns));
 }
 
 /*