2023-08-10 13:44:26

by Heinz Mauelshagen

[permalink] [raw]
Subject: [PATCH 0/3] md raid1: Fix writebehind/writemostly

From: heinzm <[email protected]>

Writemostly was only respected if set on the first leg.

Set on any other leg(s) but not on the first one did
not enable writebehind at all.

Fix changes the logic using the already defind bool writebehind.

Whilst on this, also make first_clone a bool as write_behind for
consistency and add an empty line.

Patches pass the MD test suite.

heinzm (3):
md raid1: allow writebehind to work on any leg device set WriteMostly
md raid1: make first_clone a bool
md raid1: add empty line

Signed-off-by: Heinz Mauelshagen <[email protected]>
Tested-by: Xia Ni <[email protected]>

drivers/md/raid1.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

--
2.41.0



2023-08-10 13:51:09

by Heinz Mauelshagen

[permalink] [raw]
Subject: [PATCH 3/3] md raid1: add empty line

From: heinzm <[email protected]>

Signed-off-by: heinzm <[email protected]>
---
drivers/md/raid1.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 0aed74efd758..5c469ce843c8 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1509,6 +1509,7 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
for (i = 0; i < disks; i++) {
struct bio *mbio = NULL;
struct md_rdev *rdev = conf->mirrors[i].rdev;
+
if (!r1_bio->bios[i])
continue;

--
2.41.0


2023-08-13 19:05:41

by Song Liu

[permalink] [raw]
Subject: Re: [PATCH 0/3] md raid1: Fix writebehind/writemostly

On Thu, Aug 10, 2023 at 4:12 PM <[email protected]> wrote:
>
> From: heinzm <[email protected]>
>
> Writemostly was only respected if set on the first leg.
>
> Set on any other leg(s) but not on the first one did
> not enable writebehind at all.
>
> Fix changes the logic using the already defind bool writebehind.
>
> Whilst on this, also make first_clone a bool as write_behind for
> consistency and add an empty line.
>
> Patches pass the MD test suite.
>
> heinzm (3):
> md raid1: allow writebehind to work on any leg device set WriteMostly

1/3 looks good. But please resend with your full name.

> md raid1: make first_clone a bool
> md raid1: add empty line

2/3 and 3/3 are not necessary. I would rather keep git-blame clean.

Thanks,
Song
>
> Signed-off-by: Heinz Mauelshagen <[email protected]>
> Tested-by: Xia Ni <[email protected]>
>
> drivers/md/raid1.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> --
> 2.41.0
>