linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org
Subject: Re: [PATCH 1/5] null_blk: remove the bio based I/O path
Date: Wed, 14 Feb 2024 16:34:21 -0700	[thread overview]
Message-ID: <Zc1N_fjAozmbD7-_@kbusch-mbp> (raw)
In-Reply-To: <0a5497e2-87f1-481a-9948-bd9e68b3bb79@kernel.org>

On Thu, Feb 15, 2024 at 08:16:19AM +0900, Damien Le Moal wrote:
> On 2/15/24 02:25, Keith Busch wrote:
> > On Wed, Feb 14, 2024 at 10:54:57AM +0100, Christoph Hellwig wrote:
> >> @@ -2036,11 +1813,15 @@ static int null_validate_conf(struct nullb_device *dev)
> >>  		pr_err("legacy IO path is no longer available\n");
> >>  		return -EINVAL;
> >>  	}
> >> +	if (dev->queue_mode == NULL_Q_BIO) {
> >> +		pr_err("BIO-based IO path is no longer available, using blk-mq instead.\n");
> >> +		dev->queue_mode = NULL_Q_MQ;
> >> +	}
> > 
> > Seems pointless to keep dev->queue_mode around if only one value is
> > valid.
> > 
> > Instead of checking the param here once per device, could we do it just
> > once for the module in null_set_queue_mode()?
> 
> We need the check for the configfs path as well...

Yeah, my snippet suggestion wasn't a fully flushed out idea. The
configfs part would just be this:

---
@@ -401,12 +401,20 @@ static int nullb_apply_poll_queues(struct nullb_device *dev,
        return nullb_update_nr_hw_queues(dev, dev->submit_queues, poll_queues);
 }

+static int nullb_apply_queue_mode(struct nullb_device *dev,
+                                 unsigned int queue_mode)
+{
+	if (queue_mode != NULL_Q_MQ)
+		return -EINVAL;
+	return 0;
+}
+
 NULLB_DEVICE_ATTR(size, ulong, NULL);
 NULLB_DEVICE_ATTR(completion_nsec, ulong, NULL);
 NULLB_DEVICE_ATTR(submit_queues, uint, nullb_apply_submit_queues);
 NULLB_DEVICE_ATTR(poll_queues, uint, nullb_apply_poll_queues);
 NULLB_DEVICE_ATTR(home_node, uint, NULL);
-NULLB_DEVICE_ATTR(queue_mode, uint, NULL);
+NULLB_DEVICE_ATTR(queue_mode, uint, nullb_apply_queue_mode);
 NULLB_DEVICE_ATTR(blocksize, uint, NULL);
 NULLB_DEVICE_ATTR(max_sectors, uint, NULL);
 NULLB_DEVICE_ATTR(irqmode, uint, NULL);
--

  reply	other threads:[~2024-02-14 23:34 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-14  9:54 drop bio mode from null_blk and convert it to atomic queue limits Christoph Hellwig
2024-02-14  9:54 ` [PATCH 1/5] null_blk: remove the bio based I/O path Christoph Hellwig
2024-02-14 11:25   ` Damien Le Moal
2024-02-14 17:25   ` Keith Busch
2024-02-14 23:16     ` Damien Le Moal
2024-02-14 23:34       ` Keith Busch [this message]
2024-02-15  8:05     ` Christoph Hellwig
2024-02-14  9:54 ` [PATCH 2/5] null_blk: initialize the tag_set timeout in null_init_tag_set Christoph Hellwig
2024-02-14 11:26   ` Damien Le Moal
2024-02-14  9:54 ` [PATCH 3/5] null_blk: refactor tag_set setup Christoph Hellwig
2024-02-14 11:29   ` Damien Le Moal
2024-02-14  9:55 ` [PATCH 4/5] null_blk: remove null_gendisk_register Christoph Hellwig
2024-02-14 11:30   ` Damien Le Moal
2024-02-14  9:55 ` [PATCH 5/5] null_blk: pass queue_limits to blk_mq_alloc_disk Christoph Hellwig
2024-02-14 11:32   ` Damien Le Moal
2024-02-14 14:08 ` drop bio mode from null_blk and convert it to atomic queue limits Johannes Thumshirn
  -- strict thread matches above, loose matches on Subject: below --
2024-02-19  6:29 drop bio mode from null_blk and convert it to atomic queue limits v2 Christoph Hellwig
2024-02-19  6:29 ` [PATCH 1/5] null_blk: remove the bio based I/O path Christoph Hellwig
2024-02-20  5:32 drop bio mode from null_blk and convert it to atomic queue limits v3 Christoph Hellwig
2024-02-20  5:32 ` [PATCH 1/5] null_blk: remove the bio based I/O path Christoph Hellwig
2024-02-20  7:21   ` Hannes Reinecke
2024-02-20  9:32 drop bio mode from null_blk and convert it to atomic queue limits v4 Christoph Hellwig
2024-02-20  9:32 ` [PATCH 1/5] null_blk: remove the bio based I/O path Christoph Hellwig
2024-02-20 11:02   ` John Garry

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=Zc1N_fjAozmbD7-_@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=dlemoal@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-block@vger.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).