linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yu Kuai <yukuai1@huaweicloud.com>
To: heinzm@redhat.com, linux-kernel@vger.kernel.org,
	linux-raid@vger.kernel.org
Cc: ncroxon@redhat.com, xni@redhat.com, "yukuai (C)" <yukuai3@huawei.com>
Subject: Re: [PATCH 1/3] md raid1: allow writebehind to work on any leg device set WriteMostly
Date: Fri, 11 Aug 2023 09:14:49 +0800	[thread overview]
Message-ID: <1b42c6ba-168d-4764-1eba-3f7050883e69@huaweicloud.com> (raw)
In-Reply-To: <31b94de1196389c8d5e7a29d01ec1e7d20735d4e.1691592775.git.heinzm@redhat.com>

Hi,

在 2023/08/10 20:11, heinzm@redhat.com 写道:
> From: heinzm <heinzm@redhat.com>
> 
> As the WriteMostly flag can be set on any component device of a RAID1 array,
> remove the constraint that it only works if set on the first one.
> 
> Signed-off-by: heinzm <heinzm@redhat.com>
> ---
>   drivers/md/raid1.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
> index dd25832eb045..913cd46b786b 100644
> --- a/drivers/md/raid1.c
> +++ b/drivers/md/raid1.c
> @@ -1519,7 +1519,7 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
>   			 * allocate memory, or a reader on WriteMostly
>   			 * is waiting for behind writes to flush */
>   			if (bitmap &&
> -			    test_bit(WriteMostly, &rdev->flags) &&
> +			    write_behind &&

No need for a new line now.

Reviewed-by: Yu Kuai <yukuai3@huawei.com>

Thanks
>   			    (atomic_read(&bitmap->behind_writes)
>   			     < mddev->bitmap_info.max_write_behind) &&
>   			    !waitqueue_active(&bitmap->behind_wait)) {
> 


  reply	other threads:[~2023-08-11  1:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-10 12:11 [PATCH 0/3] md raid1: Fix writebehind/writemostly heinzm
2023-08-10 12:11 ` [PATCH 1/3] md raid1: allow writebehind to work on any leg device set WriteMostly heinzm
2023-08-11  1:14   ` Yu Kuai [this message]
2023-08-10 12:11 ` [PATCH 2/3] md raid1: make first_clone a bool heinzm
2023-08-10 12:11 ` [PATCH 3/3] md raid1: add empty line heinzm
2023-08-13 17:56 ` [PATCH 0/3] md raid1: Fix writebehind/writemostly Song Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1b42c6ba-168d-4764-1eba-3f7050883e69@huaweicloud.com \
    --to=yukuai1@huaweicloud.com \
    --cc=heinzm@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=ncroxon@redhat.com \
    --cc=xni@redhat.com \
    --cc=yukuai3@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).