From patchwork Tue Jul 19 14:02:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 9237525 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D8278607DA for ; Tue, 19 Jul 2016 14:03:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C987F27572 for ; Tue, 19 Jul 2016 14:03:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BDC9E275A2; Tue, 19 Jul 2016 14:03:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 411CD272AA for ; Tue, 19 Jul 2016 14:03:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754063AbcGSODG (ORCPT ); Tue, 19 Jul 2016 10:03:06 -0400 Received: from mx2.suse.de ([195.135.220.15]:38393 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753658AbcGSODF (ORCPT ); Tue, 19 Jul 2016 10:03:05 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 3E7C1ADD0; Tue, 19 Jul 2016 14:03:03 +0000 (UTC) From: Hannes Reinecke To: Mike Snitzer Cc: dm-devel-redhat.com@suse.de, Damien Le Moal , linux-scsi@vger.kernel.org, linux-block@vger.kernel.org, Christoph Hellwig , Jens Axboe , Hannes Reinecke Subject: [PATCH 2/3] sd: enable single-threaded I/O submission for zoned devices Date: Tue, 19 Jul 2016 16:02:57 +0200 Message-Id: <1468936978-9124-3-git-send-email-hare@suse.de> X-Mailer: git-send-email 1.8.5.6 In-Reply-To: <1468936978-9124-1-git-send-email-hare@suse.de> References: <1468936978-9124-1-git-send-email-hare@suse.de> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal --- 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); }