linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] mdadm/bitmap: locate bitmap calcuate bitmap position wrongly
@ 2020-10-28  6:04 Xiao Ni
  2020-10-28 12:29 ` heming.zhao
  0 siblings, 1 reply; 8+ messages in thread
From: Xiao Ni @ 2020-10-28  6:04 UTC (permalink / raw)
  To: jes; +Cc: heming.zhao, ncroxon, heinzm, linux-raid

Now it only adds bitmap offset based on cluster nodes. It's not right. It needs to
add per node bitmap space to find next node bitmap position.

Signed-off-by: Xiao Ni <xni@redhat.com>
---
 super1.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/super1.c b/super1.c
index 8b0d6ff..b5b379b 100644
--- a/super1.c
+++ b/super1.c
@@ -2582,8 +2582,9 @@ add_internal_bitmap1(struct supertype *st,
 
 static int locate_bitmap1(struct supertype *st, int fd, int node_num)
 {
-	unsigned long long offset;
+	unsigned long long offset, bm_sectors_per_node;
 	struct mdp_superblock_1 *sb;
+	bitmap_super_t *bms;
 	int mustfree = 0;
 	int ret;
 
@@ -2598,8 +2599,13 @@ static int locate_bitmap1(struct supertype *st, int fd, int node_num)
 		ret = 0;
 	else
 		ret = -1;
-	offset = __le64_to_cpu(sb->super_offset);
-	offset += (int32_t) __le32_to_cpu(sb->bitmap_offset) * (node_num + 1);
+
+	offset = __le64_to_cpu(sb->super_offset) + __le32_to_cpu(sb->bitmap_offset);
+	if (node_num) {
+		bms = (bitmap_super_t*)(((char*)sb)+MAX_SB_SIZE);
+		bm_sectors_per_node = calc_bitmap_size(bms, 4096) >> 9;
+		offset += bm_sectors_per_node * node_num;
+	}
 	if (mustfree)
 		free(sb);
 	lseek64(fd, offset<<9, 0);
-- 
2.7.5


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

* Re: [PATCH 1/1] mdadm/bitmap: locate bitmap calcuate bitmap position wrongly
  2020-10-28  6:04 [PATCH 1/1] mdadm/bitmap: locate bitmap calcuate bitmap position wrongly Xiao Ni
@ 2020-10-28 12:29 ` heming.zhao
  2020-10-30  5:53   ` Xiao Ni
  0 siblings, 1 reply; 8+ messages in thread
From: heming.zhao @ 2020-10-28 12:29 UTC (permalink / raw)
  To: Xiao Ni, jes; +Cc: ncroxon, heinzm, linux-raid

Hello Xiao,

My review comment:
You code only work in modern system. the boundary is 4k not 512, because using hardcode 4k to call calc_bitmap_size

In current cluster env, if bitmap area beyond 4K size (or 512 in very old system), locate_bitmap1 
will return wrong address.

Please refer write_bitmap1() to saparate 512 & 4096 case.

On 10/28/20 2:04 PM, Xiao Ni wrote:
> Now it only adds bitmap offset based on cluster nodes. It's not right. It needs to
> add per node bitmap space to find next node bitmap position.
> 
> Signed-off-by: Xiao Ni <xni@redhat.com>
> ---
>   super1.c | 12 +++++++++---
>   1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/super1.c b/super1.c
> index 8b0d6ff..b5b379b 100644
> --- a/super1.c
> +++ b/super1.c
> @@ -2582,8 +2582,9 @@ add_internal_bitmap1(struct supertype *st,
>   
>   static int locate_bitmap1(struct supertype *st, int fd, int node_num)
>   {
> -	unsigned long long offset;
> +	unsigned long long offset, bm_sectors_per_node;
>   	struct mdp_superblock_1 *sb;
> +	bitmap_super_t *bms;
>   	int mustfree = 0;
>   	int ret;
>   
> @@ -2598,8 +2599,13 @@ static int locate_bitmap1(struct supertype *st, int fd, int node_num)
>   		ret = 0;
>   	else
>   		ret = -1;
> -	offset = __le64_to_cpu(sb->super_offset);
> -	offset += (int32_t) __le32_to_cpu(sb->bitmap_offset) * (node_num + 1);
> +
> +	offset = __le64_to_cpu(sb->super_offset) + __le32_to_cpu(sb->bitmap_offset);
> +	if (node_num) {
> +		bms = (bitmap_super_t*)(((char*)sb)+MAX_SB_SIZE);
> +		bm_sectors_per_node = calc_bitmap_size(bms, 4096) >> 9;
> +		offset += bm_sectors_per_node * node_num;
> +	}
>   	if (mustfree)
>   		free(sb);
>   	lseek64(fd, offset<<9, 0);
> 


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

* Re: [PATCH 1/1] mdadm/bitmap: locate bitmap calcuate bitmap position wrongly
  2020-10-28 12:29 ` heming.zhao
@ 2020-10-30  5:53   ` Xiao Ni
  2020-10-30  6:44     ` heming.zhao
  0 siblings, 1 reply; 8+ messages in thread
From: Xiao Ni @ 2020-10-30  5:53 UTC (permalink / raw)
  To: heming.zhao, jes; +Cc: ncroxon, heinzm, linux-raid

Hi Heming

The cluster raid is only supported by super 1.2, so we don't need to 
consider the old system when
it's a cluster raid.

Regards
Xiao

On 10/28/2020 08:29 PM, heming.zhao@suse.com wrote:
> Hello Xiao,
>
> My review comment:
> You code only work in modern system. the boundary is 4k not 512, because using hardcode 4k to call calc_bitmap_size
>
> In current cluster env, if bitmap area beyond 4K size (or 512 in very old system), locate_bitmap1
> will return wrong address.
>
> Please refer write_bitmap1() to saparate 512 & 4096 case.
>
> On 10/28/20 2:04 PM, Xiao Ni wrote:
>> Now it only adds bitmap offset based on cluster nodes. It's not right. It needs to
>> add per node bitmap space to find next node bitmap position.
>>
>> Signed-off-by: Xiao Ni <xni@redhat.com>
>> ---
>>    super1.c | 12 +++++++++---
>>    1 file changed, 9 insertions(+), 3 deletions(-)
>>
>> diff --git a/super1.c b/super1.c
>> index 8b0d6ff..b5b379b 100644
>> --- a/super1.c
>> +++ b/super1.c
>> @@ -2582,8 +2582,9 @@ add_internal_bitmap1(struct supertype *st,
>>    
>>    static int locate_bitmap1(struct supertype *st, int fd, int node_num)
>>    {
>> -	unsigned long long offset;
>> +	unsigned long long offset, bm_sectors_per_node;
>>    	struct mdp_superblock_1 *sb;
>> +	bitmap_super_t *bms;
>>    	int mustfree = 0;
>>    	int ret;
>>    
>> @@ -2598,8 +2599,13 @@ static int locate_bitmap1(struct supertype *st, int fd, int node_num)
>>    		ret = 0;
>>    	else
>>    		ret = -1;
>> -	offset = __le64_to_cpu(sb->super_offset);
>> -	offset += (int32_t) __le32_to_cpu(sb->bitmap_offset) * (node_num + 1);
>> +
>> +	offset = __le64_to_cpu(sb->super_offset) + __le32_to_cpu(sb->bitmap_offset);
>> +	if (node_num) {
>> +		bms = (bitmap_super_t*)(((char*)sb)+MAX_SB_SIZE);
>> +		bm_sectors_per_node = calc_bitmap_size(bms, 4096) >> 9;
>> +		offset += bm_sectors_per_node * node_num;
>> +	}
>>    	if (mustfree)
>>    		free(sb);
>>    	lseek64(fd, offset<<9, 0);
>>


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

* Re: [PATCH 1/1] mdadm/bitmap: locate bitmap calcuate bitmap position wrongly
  2020-10-30  5:53   ` Xiao Ni
@ 2020-10-30  6:44     ` heming.zhao
  2020-11-25 23:18       ` Jes Sorensen
  0 siblings, 1 reply; 8+ messages in thread
From: heming.zhao @ 2020-10-30  6:44 UTC (permalink / raw)
  To: Xiao Ni, jes; +Cc: ncroxon, heinzm, linux-raid

You are right. Only cluster case can trigger your patch code.
Hardcode 4096 is correct.

On 10/30/20 1:53 PM, Xiao Ni wrote:
> Hi Heming
> 
> The cluster raid is only supported by super 1.2, so we don't need to consider the old system when
> it's a cluster raid.
> 
> Regards
> Xiao
> 
> On 10/28/2020 08:29 PM, heming.zhao@suse.com wrote:
>> Hello Xiao,
>>
>> My review comment:
>> You code only work in modern system. the boundary is 4k not 512, because using hardcode 4k to call calc_bitmap_size
>>
>> In current cluster env, if bitmap area beyond 4K size (or 512 in very old system), locate_bitmap1
>> will return wrong address.
>>
>> Please refer write_bitmap1() to saparate 512 & 4096 case.
>>
>> On 10/28/20 2:04 PM, Xiao Ni wrote:
>>> Now it only adds bitmap offset based on cluster nodes. It's not right. It needs to
>>> add per node bitmap space to find next node bitmap position.
>>>
>>> Signed-off-by: Xiao Ni <xni@redhat.com>
>>> ---
>>>    super1.c | 12 +++++++++---
>>>    1 file changed, 9 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/super1.c b/super1.c
>>> index 8b0d6ff..b5b379b 100644
>>> --- a/super1.c
>>> +++ b/super1.c
>>> @@ -2582,8 +2582,9 @@ add_internal_bitmap1(struct supertype *st,
>>>    static int locate_bitmap1(struct supertype *st, int fd, int node_num)
>>>    {
>>> -    unsigned long long offset;
>>> +    unsigned long long offset, bm_sectors_per_node;
>>>        struct mdp_superblock_1 *sb;
>>> +    bitmap_super_t *bms;
>>>        int mustfree = 0;
>>>        int ret;
>>> @@ -2598,8 +2599,13 @@ static int locate_bitmap1(struct supertype *st, int fd, int node_num)
>>>            ret = 0;
>>>        else
>>>            ret = -1;
>>> -    offset = __le64_to_cpu(sb->super_offset);
>>> -    offset += (int32_t) __le32_to_cpu(sb->bitmap_offset) * (node_num + 1);
>>> +
>>> +    offset = __le64_to_cpu(sb->super_offset) + __le32_to_cpu(sb->bitmap_offset);
>>> +    if (node_num) {
>>> +        bms = (bitmap_super_t*)(((char*)sb)+MAX_SB_SIZE);
>>> +        bm_sectors_per_node = calc_bitmap_size(bms, 4096) >> 9;
>>> +        offset += bm_sectors_per_node * node_num;
>>> +    }
>>>        if (mustfree)
>>>            free(sb);
>>>        lseek64(fd, offset<<9, 0);
>>>
> 


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

* Re: [PATCH 1/1] mdadm/bitmap: locate bitmap calcuate bitmap position wrongly
  2020-10-30  6:44     ` heming.zhao
@ 2020-11-25 23:18       ` Jes Sorensen
  2020-11-26  1:43         ` heming.zhao
  0 siblings, 1 reply; 8+ messages in thread
From: Jes Sorensen @ 2020-11-25 23:18 UTC (permalink / raw)
  To: heming.zhao, Xiao Ni; +Cc: ncroxon, heinzm, linux-raid

On 10/30/20 2:44 AM, heming.zhao@suse.com wrote:
> You are right. Only cluster case can trigger your patch code.
> Hardcode 4096 is correct.

Just catching up, was the conclusion the original patch was correct?

Thanks,
Jes


> On 10/30/20 1:53 PM, Xiao Ni wrote:
>> Hi Heming
>>
>> The cluster raid is only supported by super 1.2, so we don't need to consider the old system when
>> it's a cluster raid.
>>
>> Regards
>> Xiao
>>
>> On 10/28/2020 08:29 PM, heming.zhao@suse.com wrote:
>>> Hello Xiao,
>>>
>>> My review comment:
>>> You code only work in modern system. the boundary is 4k not 512, because using hardcode 4k to call calc_bitmap_size
>>>
>>> In current cluster env, if bitmap area beyond 4K size (or 512 in very old system), locate_bitmap1
>>> will return wrong address.
>>>
>>> Please refer write_bitmap1() to saparate 512 & 4096 case.
>>>
>>> On 10/28/20 2:04 PM, Xiao Ni wrote:
>>>> Now it only adds bitmap offset based on cluster nodes. It's not right. It needs to
>>>> add per node bitmap space to find next node bitmap position.
>>>>
>>>> Signed-off-by: Xiao Ni <xni@redhat.com>
>>>> ---
>>>>    super1.c | 12 +++++++++---
>>>>    1 file changed, 9 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/super1.c b/super1.c
>>>> index 8b0d6ff..b5b379b 100644
>>>> --- a/super1.c
>>>> +++ b/super1.c
>>>> @@ -2582,8 +2582,9 @@ add_internal_bitmap1(struct supertype *st,
>>>>    static int locate_bitmap1(struct supertype *st, int fd, int node_num)
>>>>    {
>>>> -    unsigned long long offset;
>>>> +    unsigned long long offset, bm_sectors_per_node;
>>>>        struct mdp_superblock_1 *sb;
>>>> +    bitmap_super_t *bms;
>>>>        int mustfree = 0;
>>>>        int ret;
>>>> @@ -2598,8 +2599,13 @@ static int locate_bitmap1(struct supertype *st, int fd, int node_num)
>>>>            ret = 0;
>>>>        else
>>>>            ret = -1;
>>>> -    offset = __le64_to_cpu(sb->super_offset);
>>>> -    offset += (int32_t) __le32_to_cpu(sb->bitmap_offset) * (node_num + 1);
>>>> +
>>>> +    offset = __le64_to_cpu(sb->super_offset) + __le32_to_cpu(sb->bitmap_offset);
>>>> +    if (node_num) {
>>>> +        bms = (bitmap_super_t*)(((char*)sb)+MAX_SB_SIZE);
>>>> +        bm_sectors_per_node = calc_bitmap_size(bms, 4096) >> 9;
>>>> +        offset += bm_sectors_per_node * node_num;
>>>> +    }
>>>>        if (mustfree)
>>>>            free(sb);
>>>>        lseek64(fd, offset<<9, 0);
>>>>
>>
> 



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

* Re: [PATCH 1/1] mdadm/bitmap: locate bitmap calcuate bitmap position wrongly
  2020-11-25 23:18       ` Jes Sorensen
@ 2020-11-26  1:43         ` heming.zhao
  2021-02-26 22:00           ` Jes Sorensen
  0 siblings, 1 reply; 8+ messages in thread
From: heming.zhao @ 2020-11-26  1:43 UTC (permalink / raw)
  To: Jes Sorensen, Xiao Ni; +Cc: ncroxon, heinzm, linux-raid

On 11/26/20 7:18 AM, Jes Sorensen wrote:
> On 10/30/20 2:44 AM, heming.zhao@suse.com wrote:
>> You are right. Only cluster case can trigger your patch code.
>> Hardcode 4096 is correct.
> 
> Just catching up, was the conclusion the original patch was correct?
> 
> Thanks,
> Jes
> 
Xiao's patch (original patch) is correct.

Thanks.

> 
>> On 10/30/20 1:53 PM, Xiao Ni wrote:
>>> Hi Heming
>>>
>>> The cluster raid is only supported by super 1.2, so we don't need to consider the old system when
>>> it's a cluster raid.
>>>
>>> Regards
>>> Xiao
>>>
>>> On 10/28/2020 08:29 PM, heming.zhao@suse.com wrote:
>>>> Hello Xiao,
>>>>
>>>> My review comment:
>>>> You code only work in modern system. the boundary is 4k not 512, because using hardcode 4k to call calc_bitmap_size
>>>>
>>>> In current cluster env, if bitmap area beyond 4K size (or 512 in very old system), locate_bitmap1
>>>> will return wrong address.
>>>>
>>>> Please refer write_bitmap1() to saparate 512 & 4096 case.
>>>>
>>>> On 10/28/20 2:04 PM, Xiao Ni wrote:
>>>>> Now it only adds bitmap offset based on cluster nodes. It's not right. It needs to
>>>>> add per node bitmap space to find next node bitmap position.
>>>>>
>>>>> Signed-off-by: Xiao Ni <xni@redhat.com>
>>>>> ---
>>>>>     super1.c | 12 +++++++++---
>>>>>     1 file changed, 9 insertions(+), 3 deletions(-)
>>>>>
>>>>> diff --git a/super1.c b/super1.c
>>>>> index 8b0d6ff..b5b379b 100644
>>>>> --- a/super1.c
>>>>> +++ b/super1.c
>>>>> @@ -2582,8 +2582,9 @@ add_internal_bitmap1(struct supertype *st,
>>>>>     static int locate_bitmap1(struct supertype *st, int fd, int node_num)
>>>>>     {
>>>>> -    unsigned long long offset;
>>>>> +    unsigned long long offset, bm_sectors_per_node;
>>>>>         struct mdp_superblock_1 *sb;
>>>>> +    bitmap_super_t *bms;
>>>>>         int mustfree = 0;
>>>>>         int ret;
>>>>> @@ -2598,8 +2599,13 @@ static int locate_bitmap1(struct supertype *st, int fd, int node_num)
>>>>>             ret = 0;
>>>>>         else
>>>>>             ret = -1;
>>>>> -    offset = __le64_to_cpu(sb->super_offset);
>>>>> -    offset += (int32_t) __le32_to_cpu(sb->bitmap_offset) * (node_num + 1);
>>>>> +
>>>>> +    offset = __le64_to_cpu(sb->super_offset) + __le32_to_cpu(sb->bitmap_offset);
>>>>> +    if (node_num) {
>>>>> +        bms = (bitmap_super_t*)(((char*)sb)+MAX_SB_SIZE);
>>>>> +        bm_sectors_per_node = calc_bitmap_size(bms, 4096) >> 9;
>>>>> +        offset += bm_sectors_per_node * node_num;
>>>>> +    }
>>>>>         if (mustfree)
>>>>>             free(sb);
>>>>>         lseek64(fd, offset<<9, 0);
>>>>>
>>>
>>
> 
> 


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

* Re: [PATCH 1/1] mdadm/bitmap: locate bitmap calcuate bitmap position wrongly
  2020-11-26  1:43         ` heming.zhao
@ 2021-02-26 22:00           ` Jes Sorensen
  0 siblings, 0 replies; 8+ messages in thread
From: Jes Sorensen @ 2021-02-26 22:00 UTC (permalink / raw)
  To: heming.zhao, Xiao Ni; +Cc: ncroxon, heinzm, linux-raid

On 11/25/20 8:43 PM, heming.zhao@suse.com wrote:
> On 11/26/20 7:18 AM, Jes Sorensen wrote:
>> On 10/30/20 2:44 AM, heming.zhao@suse.com wrote:
>>> You are right. Only cluster case can trigger your patch code.
>>> Hardcode 4096 is correct.
>>
>> Just catching up, was the conclusion the original patch was correct?
>>
>> Thanks,
>> Jes
>>
> Xiao's patch (original patch) is correct.
> 
> Thanks.

Applied!

Thanks,
Jes


>>
>>> On 10/30/20 1:53 PM, Xiao Ni wrote:
>>>> Hi Heming
>>>>
>>>> The cluster raid is only supported by super 1.2, so we don't need to consider the old system when
>>>> it's a cluster raid.
>>>>
>>>> Regards
>>>> Xiao
>>>>
>>>> On 10/28/2020 08:29 PM, heming.zhao@suse.com wrote:
>>>>> Hello Xiao,
>>>>>
>>>>> My review comment:
>>>>> You code only work in modern system. the boundary is 4k not 512, because using hardcode 4k to call calc_bitmap_size
>>>>>
>>>>> In current cluster env, if bitmap area beyond 4K size (or 512 in very old system), locate_bitmap1
>>>>> will return wrong address.
>>>>>
>>>>> Please refer write_bitmap1() to saparate 512 & 4096 case.
>>>>>
>>>>> On 10/28/20 2:04 PM, Xiao Ni wrote:
>>>>>> Now it only adds bitmap offset based on cluster nodes. It's not right. It needs to
>>>>>> add per node bitmap space to find next node bitmap position.
>>>>>>
>>>>>> Signed-off-by: Xiao Ni <xni@redhat.com>
>>>>>> ---
>>>>>>     super1.c | 12 +++++++++---
>>>>>>     1 file changed, 9 insertions(+), 3 deletions(-)
>>>>>>
>>>>>> diff --git a/super1.c b/super1.c
>>>>>> index 8b0d6ff..b5b379b 100644
>>>>>> --- a/super1.c
>>>>>> +++ b/super1.c
>>>>>> @@ -2582,8 +2582,9 @@ add_internal_bitmap1(struct supertype *st,
>>>>>>     static int locate_bitmap1(struct supertype *st, int fd, int node_num)
>>>>>>     {
>>>>>> -    unsigned long long offset;
>>>>>> +    unsigned long long offset, bm_sectors_per_node;
>>>>>>         struct mdp_superblock_1 *sb;
>>>>>> +    bitmap_super_t *bms;
>>>>>>         int mustfree = 0;
>>>>>>         int ret;
>>>>>> @@ -2598,8 +2599,13 @@ static int locate_bitmap1(struct supertype *st, int fd, int node_num)
>>>>>>             ret = 0;
>>>>>>         else
>>>>>>             ret = -1;
>>>>>> -    offset = __le64_to_cpu(sb->super_offset);
>>>>>> -    offset += (int32_t) __le32_to_cpu(sb->bitmap_offset) * (node_num + 1);
>>>>>> +
>>>>>> +    offset = __le64_to_cpu(sb->super_offset) + __le32_to_cpu(sb->bitmap_offset);
>>>>>> +    if (node_num) {
>>>>>> +        bms = (bitmap_super_t*)(((char*)sb)+MAX_SB_SIZE);
>>>>>> +        bm_sectors_per_node = calc_bitmap_size(bms, 4096) >> 9;
>>>>>> +        offset += bm_sectors_per_node * node_num;
>>>>>> +    }
>>>>>>         if (mustfree)
>>>>>>             free(sb);
>>>>>>         lseek64(fd, offset<<9, 0);
>>>>>>
>>>>
>>>
>>
>>
> 



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

* [PATCH 1/1] mdadm/bitmap: locate bitmap calcuate bitmap position wrongly
@ 2020-10-28  5:57 Xiao Ni
  0 siblings, 0 replies; 8+ messages in thread
From: Xiao Ni @ 2020-10-28  5:57 UTC (permalink / raw)
  To: linux-raid, jes; +Cc: heming.zhao, ncroxon, heinzm

Now it only adds bitmap offset based on cluster nodes. It's not right. It needs to
add per node bitmap space to find next node bitmap position.

Signed-off-by: Xiao Ni <xni@redhat.com>
---
 super1.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/super1.c b/super1.c
index 8b0d6ff..b5b379b 100644
--- a/super1.c
+++ b/super1.c
@@ -2582,8 +2582,9 @@ add_internal_bitmap1(struct supertype *st,
 
 static int locate_bitmap1(struct supertype *st, int fd, int node_num)
 {
-	unsigned long long offset;
+	unsigned long long offset, bm_sectors_per_node;
 	struct mdp_superblock_1 *sb;
+	bitmap_super_t *bms;
 	int mustfree = 0;
 	int ret;
 
@@ -2598,8 +2599,13 @@ static int locate_bitmap1(struct supertype *st, int fd, int node_num)
 		ret = 0;
 	else
 		ret = -1;
-	offset = __le64_to_cpu(sb->super_offset);
-	offset += (int32_t) __le32_to_cpu(sb->bitmap_offset) * (node_num + 1);
+
+	offset = __le64_to_cpu(sb->super_offset) + __le32_to_cpu(sb->bitmap_offset);
+	if (node_num) {
+		bms = (bitmap_super_t*)(((char*)sb)+MAX_SB_SIZE);
+		bm_sectors_per_node = calc_bitmap_size(bms, 4096) >> 9;
+		offset += bm_sectors_per_node * node_num;
+	}
 	if (mustfree)
 		free(sb);
 	lseek64(fd, offset<<9, 0);
-- 
2.7.5


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

end of thread, other threads:[~2021-02-26 22:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-28  6:04 [PATCH 1/1] mdadm/bitmap: locate bitmap calcuate bitmap position wrongly Xiao Ni
2020-10-28 12:29 ` heming.zhao
2020-10-30  5:53   ` Xiao Ni
2020-10-30  6:44     ` heming.zhao
2020-11-25 23:18       ` Jes Sorensen
2020-11-26  1:43         ` heming.zhao
2021-02-26 22:00           ` Jes Sorensen
  -- strict thread matches above, loose matches on Subject: below --
2020-10-28  5:57 Xiao Ni

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).