From: Chaitanya Kulkarni <kch@nvidia.com>
To: <linux-block@vger.kernel.org>, <linux-bcache@vger.kernel.org>
Cc: <axboe@kernel.dk>, <josef@toxicpanda.com>, <minchan@kernel.org>,
<senozhatsky@chromium.org>, <colyli@suse.de>,
<kent.overstreet@gmail.com>, <dlemoal@kernel.org>,
<kch@nvidia.com>, <johannes.thumshirn@wdc.com>,
<bvanassche@acm.org>, <vincent.fu@samsung.com>,
<akinobu.mita@gmail.com>, <shinichiro.kawasaki@wdc.com>,
<nbd@other.debian.org>
Subject: [PATCH 3/5] nbd: don't clear the flag that is not set
Date: Mon, 24 Apr 2023 00:30:21 -0700 [thread overview]
Message-ID: <20230424073023.38935-4-kch@nvidia.com> (raw)
In-Reply-To: <20230424073023.38935-1-kch@nvidia.com>
QUEUE_FLAG_ADD_RANDOM is not set in nbd_dev_add() before we clear it.
There is no point in clearing the flag that is not set.
Remove blk_queue_flag_clear() for QUEUE_FLAG_ADD_RANDOM.
Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
---
drivers/block/nbd.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index d445fd0934bd..7c96ec4e99df 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -1805,7 +1805,6 @@ static struct nbd_device *nbd_dev_add(int index, unsigned int refs)
* Tell the block layer that we are not a rotational device
*/
blk_queue_flag_set(QUEUE_FLAG_NONROT, disk->queue);
- blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, disk->queue);
disk->queue->limits.discard_granularity = 0;
blk_queue_max_discard_sectors(disk->queue, 0);
blk_queue_max_segment_size(disk->queue, UINT_MAX);
--
2.40.0
next prev parent reply other threads:[~2023-04-24 7:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20230424092940epcas5p3407002e7d5c79593ffbafc38f2b49e51@epcas5p3.samsung.com>
2023-04-24 7:30 ` [PATCH 0/5] block/drivers: don't clear the flag that is not set Chaitanya Kulkarni
2023-04-24 7:30 ` [PATCH 1/5] null_blk: " Chaitanya Kulkarni
2023-04-24 7:30 ` [PATCH 2/5] brd: " Chaitanya Kulkarni
2023-04-24 7:30 ` Chaitanya Kulkarni [this message]
2023-04-24 7:30 ` [PATCH 4/5] zram: " Chaitanya Kulkarni
2023-04-24 7:30 ` [PATCH 5/5] bcache: " Chaitanya Kulkarni
2023-04-24 10:19 ` [PATCH 5/5] bcache: don't clear the flag that is not set^[ Coly Li
2023-04-24 9:26 ` [PATCH 0/5] block/drivers: don't clear the flag that is not set Nitesh Shetty
2023-04-24 10:25 ` Chaitanya Kulkarni
2023-04-24 10:40 ` Nitesh Shetty
2023-04-24 16:39 ` Jens Axboe
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=20230424073023.38935-4-kch@nvidia.com \
--to=kch@nvidia.com \
--cc=akinobu.mita@gmail.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=colyli@suse.de \
--cc=dlemoal@kernel.org \
--cc=johannes.thumshirn@wdc.com \
--cc=josef@toxicpanda.com \
--cc=kent.overstreet@gmail.com \
--cc=linux-bcache@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=nbd@other.debian.org \
--cc=senozhatsky@chromium.org \
--cc=shinichiro.kawasaki@wdc.com \
--cc=vincent.fu@samsung.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