mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Menzel <pmenzel@molgen.mpg.de>
To: Logan Gunthorpe <logang@deltatee.com>
Cc: Song Liu <song@kernel.org>,
	linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org,
	Christoph Hellwig <hch@infradead.org>,
	Guoqing Jiang <guoqing.jiang@linux.dev>,
	Stephen Bates <sbates@raithlin.com>,
	Martin Oliveira <Martin.Oliveira@eideticom.com>,
	David Sloan <David.Sloan@eideticom.com>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH v2 2/3] md: Remove extra mddev_get() in md_seq_start()
Date: Fri, 9 Sep 2022 06:53:34 +0200	[thread overview]
Message-ID: <4ccf5784-9e7f-6faf-a710-a97273ebd737@molgen.mpg.de> (raw)
In-Reply-To: <20220908161516.4361-3-logang@deltatee.com>

Dear Logan,


Thank you for the updated series. One nit below, which could be 
corrected by the maintainer before applying.

Am 08.09.22 um 18:15 schrieb Logan Gunthorpe:
> A regression is seen where mddev devices stay permanently after they
> are stopped due to an elevated reference count.
> 
> This was tracked down to an extra mddev_get() in md_seq_start().
> 
> It only happened rarely because most of the time the md_seq_start()
> is called with a zero offset. The path with an extra mddev_get() only
> happens when it starts with a non-zero offset.
> 
> The commit noted below changed an mddev_get() to check its success
> but inadevrtantly left the original call in. Remove the extra call.

inadvertently

> Fixes: 12a6caf27324 ("md: only delete entries from all_mddevs when the disk is freed")
> Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> Acked-by: Guoqing Jiang <Guoqing.jiang@linux.dev>
> ---
>   drivers/md/md.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index afaf36b2f6ab..9dc0175280b4 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -8154,7 +8154,6 @@ static void *md_seq_start(struct seq_file *seq, loff_t *pos)
>   	list_for_each(tmp,&all_mddevs)
>   		if (!l--) {
>   			mddev = list_entry(tmp, struct mddev, all_mddevs);
> -			mddev_get(mddev);
>   			if (!mddev_get(mddev))
>   				continue;
>   			spin_unlock(&all_mddevs_lock);


Kind regards,

Paul

  reply	other threads:[~2022-09-09  4:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-08 16:15 [PATCH v2 0/3] A couple more bug fixes Logan Gunthorpe
2022-09-08 16:15 ` [PATCH v2 1/3] md/raid5: Remove unnecessary bio_put() in raid5_read_one_chunk() Logan Gunthorpe
2022-09-08 16:15 ` [PATCH v2 2/3] md: Remove extra mddev_get() in md_seq_start() Logan Gunthorpe
2022-09-09  4:53   ` Paul Menzel [this message]
2022-09-08 16:15 ` [PATCH v2 3/3] md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d Logan Gunthorpe
2022-09-15 15:15   ` Logan Gunthorpe
2022-09-19 18:31     ` Song Liu
2022-09-09 14:41 ` [PATCH v2 0/3] A couple more bug fixes 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=4ccf5784-9e7f-6faf-a710-a97273ebd737@molgen.mpg.de \
    --to=pmenzel@molgen.mpg.de \
    --cc=David.Sloan@eideticom.com \
    --cc=Martin.Oliveira@eideticom.com \
    --cc=guoqing.jiang@linux.dev \
    --cc=hch@infradead.org \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=logang@deltatee.com \
    --cc=sbates@raithlin.com \
    --cc=song@kernel.org \
    /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

all inboxes | Powered by JetHome®