mbox series

[0/3] md/raid10: record rdev/replacement in r10bio

Message ID 20230614084740.1493969-1-linan666@huaweicloud.com (mailing list archive)
Headers show
Series md/raid10: record rdev/replacement in r10bio | expand

Message

Li Nan June 14, 2023, 8:47 a.m. UTC
From: Li Nan <linan122@huawei.com>

Replacement can replace rdev during replacement io pending.
mirror->rdev/replacement might be changed during io pending. Get rdev from
it is risky. This patch series record rdev/replacement in r10bio, and get
rdev from r10bio to fix bugs in normal write. And I want to do
this for each io type later.

Li Nan (3):
  md/raid10: record rdev/replacement in struct r10bio
  md/raid10: get rdev/replacemenet from r10bio for normal write
  md/raid10: improve raid10_end_write_request()

 drivers/md/raid10.c | 96 ++++++++++++++++++++++-----------------------
 drivers/md/raid10.h | 12 +++---
 2 files changed, 54 insertions(+), 54 deletions(-)

Comments

Yu Kuai June 15, 2023, 3:31 a.m. UTC | #1
Hi,

在 2023/06/14 16:47, linan666@huaweicloud.com 写道:
> From: Li Nan <linan122@huawei.com>
> 
> Replacement can replace rdev during replacement io pending.
> mirror->rdev/replacement might be changed during io pending. Get rdev from
> it is risky. This patch series record rdev/replacement in r10bio, and get
> rdev from r10bio to fix bugs in normal write. And I want to do
> this for each io type later.

I personally don't like this, do things by half. I'm good with this
approch for raid10, but can you send a new version to use this for all
io?

Thanks,
Kuai
> 
> Li Nan (3):
>    md/raid10: record rdev/replacement in struct r10bio
>    md/raid10: get rdev/replacemenet from r10bio for normal write
>    md/raid10: improve raid10_end_write_request()
> 
>   drivers/md/raid10.c | 96 ++++++++++++++++++++++-----------------------
>   drivers/md/raid10.h | 12 +++---
>   2 files changed, 54 insertions(+), 54 deletions(-)
>
Song Liu June 16, 2023, 7:03 a.m. UTC | #2
On Wed, Jun 14, 2023 at 8:31 PM Yu Kuai <yukuai1@huaweicloud.com> wrote:
>
> Hi,
>
> 在 2023/06/14 16:47, linan666@huaweicloud.com 写道:
> > From: Li Nan <linan122@huawei.com>
> >
> > Replacement can replace rdev during replacement io pending.
> > mirror->rdev/replacement might be changed during io pending. Get rdev from
> > it is risky. This patch series record rdev/replacement in r10bio, and get
> > rdev from r10bio to fix bugs in normal write. And I want to do
> > this for each io type later.
>
> I personally don't like this, do things by half. I'm good with this
> approch for raid10, but can you send a new version to use this for all
> io?

Agreed. Please send the fix for all types.

Thanks,
Song
Li Nan June 16, 2023, 9:01 a.m. UTC | #3
在 2023/6/16 15:03, Song Liu 写道:
> On Wed, Jun 14, 2023 at 8:31 PM Yu Kuai <yukuai1@huaweicloud.com> wrote:
>>
>> Hi,
>>
>> 在 2023/06/14 16:47, linan666@huaweicloud.com 写道:
>>> From: Li Nan <linan122@huawei.com>
>>>
>>> Replacement can replace rdev during replacement io pending.
>>> mirror->rdev/replacement might be changed during io pending. Get rdev from
>>> it is risky. This patch series record rdev/replacement in r10bio, and get
>>> rdev from r10bio to fix bugs in normal write. And I want to do
>>> this for each io type later.
>>
>> I personally don't like this, do things by half. I'm good with this
>> approch for raid10, but can you send a new version to use this for all
>> io?
> 
> Agreed. Please send the fix for all types.
> 

OK, Let me fix all types.

> Thanks,
> Song
> .