From: Mike Snitzer <snitzer@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: dm-devel@redhat.com
Subject: Re: dm: fix blk-mq request-based DM queue initialization
Date: Thu, 30 Apr 2015 08:47:41 -0400 [thread overview]
Message-ID: <20150430124741.GA29757@redhat.com> (raw)
In-Reply-To: <20150430082315.GA17074@lst.de>
On Thu, Apr 30 2015 at 4:23am -0400,
Christoph Hellwig <hch@lst.de> wrote:
> On Thu, Apr 30, 2015 at 09:22:00AM +0200, Christoph Hellwig wrote:
> > Well - we're obviously trying to reinitialize it here and only error
> > out very low level with your patch. What I mean is that we shouldn't
> > even try to reinitialize it at a much higher level, so we don't need
> > this blk-mq specific hack down here.
OK, understood.
> FYI, this fixes the isssue for me and seems to be "more correct" at
> a higher level:
Yeah, I like this. Means the early return in
dm_init_request_based_queue() can be removed too.
> ---
> From: Christoph Hellwig <hch@lst.de>
> Subject: [PATCH] dm: only initialize request_queue once
>
> We should only inіnitialize the request_queue on the initial table load when
> we assing the device type.
"assing" ;) Will fix up and also add that this patch fixes the issue
you reported, thanks.
> Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
> index c8a18e4..de92662 100644
> --- a/drivers/md/dm-ioctl.c
> +++ b/drivers/md/dm-ioctl.c
> @@ -1298,21 +1298,22 @@ static int table_load(struct dm_ioctl *param, size_t param_size)
> goto err_unlock_md_type;
> }
>
> - if (dm_get_md_type(md) == DM_TYPE_NONE)
> + if (dm_get_md_type(md) == DM_TYPE_NONE) {
> /* Initial table load: acquire type of table. */
> dm_set_md_type(md, dm_table_get_type(t));
> - else if (dm_get_md_type(md) != dm_table_get_type(t)) {
> +
> + /* setup md->queue to reflect md's type (may block) */
> + r = dm_setup_md_queue(md);
> + if (r) {
> + DMWARN("unable to set up device queue for new table.");
> + goto err_unlock_md_type;
> + }
> + } else if (dm_get_md_type(md) != dm_table_get_type(t)) {
> DMWARN("can't change device type after initial table load.");
> r = -EINVAL;
> goto err_unlock_md_type;
> }
>
> - /* setup md->queue to reflect md's type (may block) */
> - r = dm_setup_md_queue(md);
> - if (r) {
> - DMWARN("unable to set up device queue for new table.");
> - goto err_unlock_md_type;
> - }
> dm_unlock_md_type(md);
>
> /* stage inactive table */
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
prev parent reply other threads:[~2015-04-30 12:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-25 9:23 CONFIG_DM_MQ_DEFAULT makes my kernel unhappy Christoph Hellwig
2015-04-25 15:28 ` Mike Snitzer
2015-04-25 15:37 ` Christoph Hellwig
2015-04-26 14:16 ` Christoph Hellwig
2015-04-27 15:59 ` Mike Snitzer
2015-04-27 16:03 ` Christoph Hellwig
2015-04-27 19:03 ` Mike Snitzer
2015-04-29 0:59 ` [PATCH] dm: fix blk-mq request-based DM queue initialization Mike Snitzer
2015-04-29 13:00 ` Christoph Hellwig
2015-04-30 1:41 ` Mike Snitzer
2015-04-30 7:22 ` Christoph Hellwig
2015-04-30 8:23 ` Christoph Hellwig
2015-04-30 12:47 ` Mike Snitzer [this message]
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=20150430124741.GA29757@redhat.com \
--to=snitzer@redhat.com \
--cc=dm-devel@redhat.com \
--cc=hch@lst.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.