linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Mike Snitzer <snitzer@redhat.com>
Cc: dm-devel-redhat.com@suse.de,
	Damien Le Moal <damien.lemoal@hgst.com>,
	linux-scsi@vger.kernel.org, linux-block@vger.kernel.org,
	Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@fb.com>,
	Hannes Reinecke <hare@suse.de>
Subject: [PATCH 2/3] sd: enable single-threaded I/O submission for zoned devices
Date: Tue, 19 Jul 2016 16:02:57 +0200	[thread overview]
Message-ID: <1468936978-9124-3-git-send-email-hare@suse.de> (raw)
In-Reply-To: <1468936978-9124-1-git-send-email-hare@suse.de>

zoned devices require single-thread I/O submission to guarantee
sequential I/O, so enable the block layer flag for it.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/scsi/sd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 4b704b0..44960fd 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2154,6 +2154,7 @@ static void sd_read_zones(struct scsi_disk *sdkp, unsigned char *buffer)
 	blk_queue_chunk_sectors(sdkp->disk->queue,
 				logical_to_sectors(sdkp->device, zone_len));
 	sd_config_discard(sdkp, SD_ZBC_RESET_WP);
+	queue_flag_set_unlocked(QUEUE_FLAG_SINGLE, sdkp->disk->queue);
 
 	sd_zbc_setup(sdkp, buffer, SD_BUF_SIZE);
 }
-- 
1.8.5.6


  parent reply	other threads:[~2016-07-19 14:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-19 14:02 [PATCH 0/3] dm-zoned target for ZBC devices Hannes Reinecke
2016-07-19 14:02 ` [PATCH 1/3] block: add flag for single-threaded submission Hannes Reinecke
2016-07-20  1:13   ` Damien Le Moal
2016-07-21  5:54   ` Christoph Hellwig
2016-07-21  6:01     ` Hannes Reinecke
2016-07-21  6:37       ` Hannes Reinecke
2016-07-21  7:10         ` Damien Le Moal
2016-07-21 14:38         ` Christoph Hellwig
2016-07-19 14:02 ` Hannes Reinecke [this message]
2016-07-20  1:15   ` [PATCH 2/3] sd: enable single-threaded I/O submission for zoned devices Damien Le Moal
2016-07-19 14:02 ` [PATCH 3/3] dm-zoned: New device mapper target for zoned block devices Hannes Reinecke

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=1468936978-9124-3-git-send-email-hare@suse.de \
    --to=hare@suse.de \
    --cc=axboe@fb.com \
    --cc=damien.lemoal@hgst.com \
    --cc=dm-devel-redhat.com@suse.de \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=snitzer@redhat.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;
as well as URLs for NNTP newsgroup(s).