linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [mdadm PATCH] mdadm: make create clustered raid10 possible
@ 2017-10-24  7:31 Guoqing Jiang
  2017-10-24 20:05 ` NeilBrown
  2017-10-30  5:57 ` Shaohua Li
  0 siblings, 2 replies; 5+ messages in thread
From: Guoqing Jiang @ 2017-10-24  7:31 UTC (permalink / raw)
  To: jsorensen; +Cc: linux-raid

This change to make we can create a clustered
raid10 array as well.

Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
---
 mdadm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/mdadm.c b/mdadm.c
index 7cdcdba7c652..60d80e0103f4 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -1542,8 +1542,9 @@ int main(int argc, char *argv[])
 				break;
 			}
 
-			if (s.level != 1) {
-				pr_err("--bitmap=clustered is currently supported with RAID mirror only\n");
+			if (s.level != 1 && s.level != 10) {
+				pr_err("--bitmap=clustered is currently "
+				       "supported with raid1/10 only\n");
 				rv = 1;
 				break;
 			}
-- 
2.10.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [mdadm PATCH] mdadm: make create clustered raid10 possible
  2017-10-24  7:31 [mdadm PATCH] mdadm: make create clustered raid10 possible Guoqing Jiang
@ 2017-10-24 20:05 ` NeilBrown
  2017-10-24 20:09   ` Jes Sorensen
  2017-10-30  5:57 ` Shaohua Li
  1 sibling, 1 reply; 5+ messages in thread
From: NeilBrown @ 2017-10-24 20:05 UTC (permalink / raw)
  To: Guoqing Jiang, jsorensen; +Cc: linux-raid

[-- Attachment #1: Type: text/plain, Size: 1129 bytes --]

On Tue, Oct 24 2017, Guoqing Jiang wrote:

> This change to make we can create a clustered
> raid10 array as well.
>
> Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
> ---
>  mdadm.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/mdadm.c b/mdadm.c
> index 7cdcdba7c652..60d80e0103f4 100644
> --- a/mdadm.c
> +++ b/mdadm.c
> @@ -1542,8 +1542,9 @@ int main(int argc, char *argv[])
>  				break;
>  			}
>  
> -			if (s.level != 1) {
> -				pr_err("--bitmap=clustered is currently supported with RAID mirror only\n");
> +			if (s.level != 1 && s.level != 10) {
> +				pr_err("--bitmap=clustered is currently "
> +				       "supported with raid1/10 only\n");


Please don't wrap strings.  It makes it hard to search for them.
Long line might be bad, but wrapped strings are worse.

Thanks,
NeilBrown


>  				rv = 1;
>  				break;
>  			}
> -- 
> 2.10.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [mdadm PATCH] mdadm: make create clustered raid10 possible
  2017-10-24 20:05 ` NeilBrown
@ 2017-10-24 20:09   ` Jes Sorensen
  0 siblings, 0 replies; 5+ messages in thread
From: Jes Sorensen @ 2017-10-24 20:09 UTC (permalink / raw)
  To: NeilBrown, Guoqing Jiang; +Cc: linux-raid

On 10/24/2017 04:05 PM, NeilBrown wrote:
> On Tue, Oct 24 2017, Guoqing Jiang wrote:
> 
>> This change to make we can create a clustered
>> raid10 array as well.
>>
>> Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
>> ---
>>   mdadm.c | 5 +++--
>>   1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/mdadm.c b/mdadm.c
>> index 7cdcdba7c652..60d80e0103f4 100644
>> --- a/mdadm.c
>> +++ b/mdadm.c
>> @@ -1542,8 +1542,9 @@ int main(int argc, char *argv[])
>>   				break;
>>   			}
>>   
>> -			if (s.level != 1) {
>> -				pr_err("--bitmap=clustered is currently supported with RAID mirror only\n");
>> +			if (s.level != 1 && s.level != 10) {
>> +				pr_err("--bitmap=clustered is currently "
>> +				       "supported with raid1/10 only\n");
> 
> 
> Please don't wrap strings.  It makes it hard to search for them.
> Long line might be bad, but wrapped strings are worse.

Personally I actually prefer the wrapped strings over the long lines, 
but given the kernel consensus is not to wrap, I apply that rule to 
mdadm as well.

Cheers,
Jes



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [mdadm PATCH] mdadm: make create clustered raid10 possible
  2017-10-24  7:31 [mdadm PATCH] mdadm: make create clustered raid10 possible Guoqing Jiang
  2017-10-24 20:05 ` NeilBrown
@ 2017-10-30  5:57 ` Shaohua Li
  2017-10-30  6:54   ` Guoqing Jiang
  1 sibling, 1 reply; 5+ messages in thread
From: Shaohua Li @ 2017-10-30  5:57 UTC (permalink / raw)
  To: Guoqing Jiang; +Cc: jsorensen, linux-raid

On Tue, Oct 24, 2017 at 03:31:24PM +0800, Guoqing Jiang wrote:
> This change to make we can create a clustered
> raid10 array as well.
> 
> Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
> ---
>  mdadm.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/mdadm.c b/mdadm.c
> index 7cdcdba7c652..60d80e0103f4 100644
> --- a/mdadm.c
> +++ b/mdadm.c
> @@ -1542,8 +1542,9 @@ int main(int argc, char *argv[])
>  				break;
>  			}
>  
> -			if (s.level != 1) {
> -				pr_err("--bitmap=clustered is currently supported with RAID mirror only\n");
> +			if (s.level != 1 && s.level != 10) {
> +				pr_err("--bitmap=clustered is currently "
> +				       "supported with raid1/10 only\n");
>  				rv = 1;
>  				break;

Since kernel only supports near layout for raid10 cluster, probably check the
layout in mdadm too?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [mdadm PATCH] mdadm: make create clustered raid10 possible
  2017-10-30  5:57 ` Shaohua Li
@ 2017-10-30  6:54   ` Guoqing Jiang
  0 siblings, 0 replies; 5+ messages in thread
From: Guoqing Jiang @ 2017-10-30  6:54 UTC (permalink / raw)
  To: Shaohua Li; +Cc: jsorensen, linux-raid



On 10/30/2017 01:57 PM, Shaohua Li wrote:
> On Tue, Oct 24, 2017 at 03:31:24PM +0800, Guoqing Jiang wrote:
>> This change to make we can create a clustered
>> raid10 array as well.
>>
>> Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
>> ---
>>   mdadm.c | 5 +++--
>>   1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/mdadm.c b/mdadm.c
>> index 7cdcdba7c652..60d80e0103f4 100644
>> --- a/mdadm.c
>> +++ b/mdadm.c
>> @@ -1542,8 +1542,9 @@ int main(int argc, char *argv[])
>>   				break;
>>   			}
>>   
>> -			if (s.level != 1) {
>> -				pr_err("--bitmap=clustered is currently supported with RAID mirror only\n");
>> +			if (s.level != 1 && s.level != 10) {
>> +				pr_err("--bitmap=clustered is currently "
>> +				       "supported with raid1/10 only\n");
>>   				rv = 1;
>>   				break;
> Since kernel only supports near layout for raid10 cluster, probably check the
> layout in mdadm too?

The changes in raid10_run has ensured only near layout is possible for 
clustered raid10.
Anyway, I will add the check either.

Thanks,
Guoqing

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-10-30  6:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-24  7:31 [mdadm PATCH] mdadm: make create clustered raid10 possible Guoqing Jiang
2017-10-24 20:05 ` NeilBrown
2017-10-24 20:09   ` Jes Sorensen
2017-10-30  5:57 ` Shaohua Li
2017-10-30  6:54   ` Guoqing Jiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).