diff mbox

[2/3] sd: enable single-threaded I/O submission for zoned devices

Message ID 1468936978-9124-3-git-send-email-hare@suse.de (mailing list archive)
State New, archived
Headers show

Commit Message

Hannes Reinecke July 19, 2016, 2:02 p.m. UTC
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(+)

Comments

Damien Le Moal July 20, 2016, 1:15 a.m. UTC | #1
On 7/19/16 23:02, Hannes Reinecke wrote:
> 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(+)

Reviewed-by: Damien Le Moal <damien.lemoal@hgst.com>
Tested-by: Damien Le Moal <damien.lemoal@hgst.com>
diff mbox

Patch

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);
 }