From patchwork Thu Nov 9 18:49:56 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: 10051689 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 9E3DB60631 for ; Thu, 9 Nov 2017 18:50:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 928492AFD4 for ; Thu, 9 Nov 2017 18:50:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 877082B06D; Thu, 9 Nov 2017 18:50:22 +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 420502AFD4 for ; Thu, 9 Nov 2017 18:50:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753996AbdKISuT (ORCPT ); Thu, 9 Nov 2017 13:50:19 -0500 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:43041 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753532AbdKISuE (ORCPT ); Thu, 9 Nov 2017 13:50:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1510253405; x=1541789405; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=ADFHoPA6tSetpeZaB+lqwFEBveXnXAdiUo8jXfOAQas=; b=MCB6B2Z/qv3vdvV3auVkkhX8yUeOD46zcdemJ1SW6VX3kSsVjMbRPJKI teOcMmW8aezkCqizfzM/LbJ5tHul0KOMO4bE8JOfu0cgmz78jDTMI3Fkb 82CRqyR61tGvrMWUNlLKkIPjTBvHVORxkK6erzLQIcbHhD/WUVnSVoq84 Ey56tXqZtrrFZiy9d/jLxEuY2i23i+i6wIJdaLRr6rcUt3hD2V/+1OL7J hzssv6eUqG20y7l7oqvPNuidVnRiw952PMH2BFxo/Omp7/KaU5F8p6xmf BTnvvIgTOqzS6mxUMOLdhmKDPASlgljvwJc0H5kg7r0FsJjwUy89eRNWu Q==; X-IronPort-AV: E=Sophos;i="5.44,370,1505750400"; d="scan'208";a="61801478" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 10 Nov 2017 02:50:03 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 09 Nov 2017 10:47:26 -0800 Received: from unknown (HELO MILHUBIP03.sdcorp.global.sandisk.com) ([10.177.9.96]) by uls-op-cesaip02.wdc.com with ESMTP; 09 Nov 2017 10:50:02 -0800 Received: from milsmgip11.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Thu, 9 Nov 2017 10:50:02 -0800 X-AuditID: 0ab10959-41c5898000002c97-f4-5a04a359486e Received: from thinkpad-bart.int.fusionio.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id D3.AE.11415.953A40A5; Thu, 9 Nov 2017 10:50:01 -0800 (PST) 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 v12 4/7] ide, scsi: Tell the block layer at request allocation time about preempt requests Date: Thu, 9 Nov 2017 10:49:56 -0800 Message-ID: <20171109184959.4617-5-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171109184959.4617-1-bart.vanassche@wdc.com> References: <20171109184959.4617-1-bart.vanassche@wdc.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrLJMWRmVeSWpSXmKPExsXCtZGTTTdyMUuUwfeFOhar7/azWVz684XR YuXqo0wWj7tmsFrsvaVt0X19B5vF8uP/mCyWzGpmsjg0GUgsfLGJ2YHL4/LZUo+J6/k8dt9s YPN4eYnD4+PTWywe7/ddZfPYfLra4/MmOY/2A91MAZxRXDYpqTmZZalF+nYJXBmL9z1hLGgV qli0fhljA+Nc/i5GTg4JAROJ35svMXYxcnEICaxklNg45TMrSIJNQE/i1Lx9TCC2iICCRM/v lWwgNrPAGyaJh98kQWxhgSyJD0vWMoLYLAKqEgc/X2QBsXkFrCRm/3nIArFAXmLt23tgNZwC 1hJ/98wFmsMBtMxKYvd9ngmM3AsYGVYxiuVm5hTnpmcWGBrqFSfmpWQWZ+sl5+duYoQEWOQO xqcTzQ8xMnFwSjUwyq+eIBa2P6HgyrLwYGP12fp8mROOnthXzsjKr2oi2Hb87LIJifWOGgte t20TZzXde+Da3yJuv138Xt3LDz3vDZbR+iMnEnK6xp152fVDnV7cl0MOnXkz4YX8DAZ9GfH/ fPlc0YZzqgU6n7+Zw2Rj7v7PKz25M4c9IH+LsPK0KatnZR47H6OixFKckWioxVxUnAgA4Up8 iuABAAA= 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 Tested-by: Oleksandr Natalenko 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 c537c4d768c1..1e94081cc791 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