linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guoqing Jiang <guoqing.jiang@linux.dev>
To: Xiao Ni <xni@redhat.com>, linux-raid <linux-raid@vger.kernel.org>
Cc: Song Liu <song@kernel.org>
Subject: Re: Memory leak when raid10 takeover raid0
Date: Mon, 10 Oct 2022 08:55:22 +0800	[thread overview]
Message-ID: <121c39a6-54e4-ee2a-9984-f1f64182a5d0@linux.dev> (raw)
In-Reply-To: <35f4a626-7f83-56c5-4cad-73ede197ccbf@linux.dev>



On 10/10/22 8:40 AM, Guoqing Jiang wrote:
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index afaf36b2f6ab..5a7134e3c182 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -3979,6 +3979,9 @@ level_store(struct mddev *mddev, const char 
> *buf, size_t len)
>                 goto out_unlock;
>         }
>
> +       /* Only accept IO after takeover is done */
> +       mddev->pers = NULL;
> +
>         /* Looks like we have a winner */
>         mddev_suspend(mddev); 

mddev->pers->quiesce is called in suspend/resume, so we need relevant 
checking in them
accordingly, maybe other places as well.

Thanks,
Guoqing

  reply	other threads:[~2022-10-10  1:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-08  9:06 Memory leak when raid10 takeover raid0 Xiao Ni
2022-10-10  0:40 ` Guoqing Jiang
2022-10-10  0:55   ` Guoqing Jiang [this message]
2022-10-10  5:48   ` Xiao Ni
2022-10-10  8:13     ` Xiao Ni
2022-10-11 13:38     ` Guoqing Jiang
2022-10-11 15:49       ` Xiao Ni
2022-10-12 10:58         ` Guoqing Jiang

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=121c39a6-54e4-ee2a-9984-f1f64182a5d0@linux.dev \
    --to=guoqing.jiang@linux.dev \
    --cc=linux-raid@vger.kernel.org \
    --cc=song@kernel.org \
    --cc=xni@redhat.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).