From patchwork Mon Oct 30 22:42:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10033391 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 11DC56039A for ; Mon, 30 Oct 2017 22:42:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 04EBB2898D for ; Mon, 30 Oct 2017 22:42:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE0122898F; Mon, 30 Oct 2017 22:42:27 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable 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 A08492898D for ; Mon, 30 Oct 2017 22:42:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752898AbdJ3WmT (ORCPT ); Mon, 30 Oct 2017 18:42:19 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:25300 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752577AbdJ3WmK (ORCPT ); Mon, 30 Oct 2017 18:42:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1509403331; x=1540939331; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=ZUXpNvL6r6w7mgLj4MPSEmA/7nE0zMYuOKmckjPQhwI=; b=eNpC95rGuSuzWJXcoLlZYMAFgtGBOFAvpm3NtYoftSnkyzS12CAlSzft FEFw0eLHrL0HsWUoJAVQLz+Kn6zVsMO2Sd7foZhl5r1BxpdI2n1Rb5PRn SMBgNPH5le4OlcQfMKYtN+S02eBzPQgP7PspmZXLkaBM8tYdgbL0WngNH qMnaRdP+xcgk2KxW4fKdcMdO7w/5FV+/4lQkEJ+HWN+pgGLkJrY7KoGdI v8aqw77LWEoFXRMO2B5UT1SeQlX637Fupv88Yf6AbpytDgSHLfuOUEdj7 nrS6hKcFtvOXX/29YbE9KDzI8YAR+oFa/8BWqHgIlqX85kclHE/sVZkpk Q==; X-IronPort-AV: E=Sophos;i="5.44,321,1505750400"; d="scan'208";a="60181978" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 31 Oct 2017 06:42:09 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 30 Oct 2017 15:40:17 -0700 Received: from unknown (HELO MILHUBIP03.sdcorp.global.sandisk.com) ([10.177.9.96]) by uls-op-cesaip02.wdc.com with ESMTP; 30 Oct 2017 15:42:08 -0700 Received: from milsmgip11.sandisk.com (10.177.9.6) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Mon, 30 Oct 2017 15:42:08 -0700 X-AuditID: 0ab10959-41c5898000002c97-94-59f7aabf89a0 Received: from thinkpad-bart.int.fusionio.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id E1.BD.11415.FBAA7F95; Mon, 30 Oct 2017 15:42:07 -0700 (PDT) From: Bart Van Assche To: Jens Axboe CC: , , "Christoph Hellwig" , "Martin K . Petersen" , Oleksandr Natalenko , Ming Lei , Martin Steigerwald , "Bart Van Assche" , Johannes Thumshirn Subject: [PATCH v11 4/7] ide, scsi: Tell the block layer at request allocation time about preempt requests Date: Mon, 30 Oct 2017 15:42:02 -0700 Message-ID: <20171030224205.25212-5-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171030224205.25212-1-bart.vanassche@wdc.com> References: <20171030224205.25212-1-bart.vanassche@wdc.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrNJMWRmVeSWpSXmKPExsXCtZEjRXf/qu+RBq2fNC1W3+1ns7j05wuj xcrVR5ksHnfNYLXYe0vbovv6DjaL5cf/MVksmdXMZHFoMpBY+GITswOXx+WzpR4T1/N57L7Z wObx8hKHx8ent1g83u+7yuax+XS1x+dNch7tB7qZAjijuGxSUnMyy1KL9O0SuDKurN3IVnBK sOLli9PMDYzP+boYOTgkBEwkGnpiuhi5OIQEVjNKPJy0gL2LkZODTUBP4tS8fUwgtoiAgkTP 75VsIDazwBsmiYffJLsY2TmEBbIkFpSARFkEVCVO3L3MCmLzClhLfLv2kBHElhCQl3i/4D6Y zSlgI7Fo03ew6UJANbsmTmeawMi9gJFhFaNYbmZOcW56ZoGhoV5xYl5KZnG2XnJ+7iZGcHBx Ru5gfDrR/BAjEwenVAOjxL7df4qWi6zb4bjuW8fZL84TAhVcJGPuuzvLzp+38OZWg+nm52U3 JpjzlkkuthdX5FbmSZ2ade8w225h9vDwwOjexI0fXndGGz3+cmthk5J3UXdornzFJs9Kl4By X9EQg4v/hI5LRmk/EDuU7r/BKdMk4EqNsMxJhzXX/syY9czL99fzV3uVWIozEg21mIuKEwFb nuNL3gEAAA== MIME-Version: 1.0 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 Convert blk_get_request(q, op, __GFP_RECLAIM) into blk_get_request_flags(q, op, BLK_MQ_PREEMPT). This patch does not change any functionality. Signed-off-by: Bart Van Assche Tested-by: Martin Steigerwald Acked-by: David S. Miller [ for IDE ] Acked-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Cc: Ming Lei Cc: Christoph Hellwig Cc: Johannes Thumshirn --- drivers/ide/ide-pm.c | 4 ++-- drivers/scsi/scsi_lib.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/ide/ide-pm.c b/drivers/ide/ide-pm.c index 544f02d673ca..f56d742908df 100644 --- a/drivers/ide/ide-pm.c +++ b/drivers/ide/ide-pm.c @@ -89,9 +89,9 @@ int generic_ide_resume(struct device *dev) } memset(&rqpm, 0, sizeof(rqpm)); - rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, __GFP_RECLAIM); + rq = blk_get_request_flags(drive->queue, REQ_OP_DRV_IN, + BLK_MQ_REQ_PREEMPT); ide_req(rq)->type = ATA_PRIV_PM_RESUME; - rq->rq_flags |= RQF_PREEMPT; rq->special = &rqpm; rqpm.pm_step = IDE_PM_START_RESUME; rqpm.pm_state = PM_EVENT_ON; diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 6f10afaca25b..7c119696402c 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -252,9 +252,9 @@ int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, struct scsi_request *rq; int ret = DRIVER_ERROR << 24; - req = blk_get_request(sdev->request_queue, + req = blk_get_request_flags(sdev->request_queue, data_direction == DMA_TO_DEVICE ? - REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, __GFP_RECLAIM); + REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, BLK_MQ_REQ_PREEMPT); if (IS_ERR(req)) return ret; rq = scsi_req(req); @@ -268,7 +268,7 @@ int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, rq->retries = retries; req->timeout = timeout; req->cmd_flags |= flags; - req->rq_flags |= rq_flags | RQF_QUIET | RQF_PREEMPT; + req->rq_flags |= rq_flags | RQF_QUIET; /* * head injection *required* here otherwise quiesce won't work