linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Song Liu <song@kernel.org>
Cc: linux-raid@vger.kernel.org, linux-block@vger.kernel.org,
	Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH] md: use mddev->external to select holder in export_rdev()
Date: Mon, 19 Jun 2023 07:00:15 +0200	[thread overview]
Message-ID: <20230619050015.GB10741@lst.de> (raw)
In-Reply-To: <20230617052405.305871-1-song@kernel.org>

On Fri, Jun 16, 2023 at 10:24:04PM -0700, Song Liu wrote:
> This means export_rdev() calls blkdev_put with a different holder than the
> one used by blkdev_get_by_dev(). This is because mddev->major_version == -2
> is not a good check for external metadata. Fix this by using
> mddev->external instead.
> 
> Also, do not clear mddev->external in md_clean(), as the flag might be used
> later in export_rdev().

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

  reply	other threads:[~2023-06-19  5:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-17  5:24 [PATCH] md: use mddev->external to select holder in export_rdev() Song Liu
2023-06-19  5:00 ` Christoph Hellwig [this message]
2023-06-20 18:50 ` Jens Axboe
2023-06-20 19:51   ` Song Liu
2023-06-21  8:10 ` Xiao Ni
2023-06-21  8:21   ` Yu Kuai
2023-06-21  8:54     ` Xiao Ni

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=20230619050015.GB10741@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).