From patchwork Mon Oct 29 16:34:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 990384 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-ide-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel-dk.20150623.gappssmtp.com header.i=@kernel-dk.20150623.gappssmtp.com header.b="Zg2TSExp"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42kKvb1zzsz9s3l for ; Tue, 30 Oct 2018 03:35:07 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727966AbeJ3BY0 (ORCPT ); Mon, 29 Oct 2018 21:24:26 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:35226 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727942AbeJ3BYZ (ORCPT ); Mon, 29 Oct 2018 21:24:25 -0400 Received: by mail-io1-f68.google.com with SMTP id 79-v6so5372149iou.2 for ; Mon, 29 Oct 2018 09:35:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7OyvgiCc3J4GeMX28vy0xfyvb/Y/ZUnCj2KzFLrudt0=; b=Zg2TSExpA3/VIa+zY5sJ+3JelsgBcYlxB7cxmOsjfnGoM0uQeFmehjHQWQ+WOmmaLr 7imNHTP7meRTfvcmLS5BIMJOi4g1BVJY1smS3D6oEq+T18Y+EoGUjCvr/t/kRhjdHy2z Nq02cdpLtt4RZ+ar+j4zuweliYQ1vXivTqhQHoEiiNsKkq0ifw+vm4oodAD8LGQ2EucQ CG+ff0zSKr2yX2mWm73BXncKAh6cBBUNAizxvH1S7UsTrs/CGEAm24AlggsMNedD2p3N /vQpGOC8BY9F2snWOtzwhbIbhcmSsOY3o5hBc+0szfnCq9TC6Jy0eFXGuCkP8FbkD09f hRsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7OyvgiCc3J4GeMX28vy0xfyvb/Y/ZUnCj2KzFLrudt0=; b=qtJubHhXkBzARb9z2BEwuLSJRkxiz20BSOdOJBTjVDf1+wqcz42xxatjRNxpmkK0a6 vqS4K0d6zu/6FuQ9gKPRXVzFgkDqB9Q2CJXQdkI+7XF1vhyk9ZtUd6CrXppgAxzoHGIj wqud0h9dKawAQu4we+7Xjc1cvbEnvMnwzzMjVszk+c5BYDu4hd8pfvnZa42PWaaXyexO HbosFE+NjwsGpju8bn1RLkbsmpEiERbM/A6PnqWAzNY+UEuhhPstbErsvjn+EQejzBux S17ElNjwB32u+5HqJ0Ahvg9C+L2RWGXVHBfYGTQZOfDGlUfxWD8IkdFft+8qM+1k9EEx 6slA== X-Gm-Message-State: AGRZ1gKAlwH2Bsz6D8z7ELIzmY6Y0jEpryGgSSrHsK/fnwAodf9kAQAZ UzYGWBRXqPCNSePjpeUdIx3tridjmHQ= X-Google-Smtp-Source: AJdET5cPhuDlElUptqYdMbnhGmKfrIrazKRGUDzxU0UJSYz0zZ8W0z6u1CS7hccOUOFa8pI+sJsoEA== X-Received: by 2002:a6b:90c6:: with SMTP id s189-v6mr8589126iod.172.1540830905004; Mon, 29 Oct 2018 09:35:05 -0700 (PDT) Received: from localhost.localdomain ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id n7-v6sm6464500itb.22.2018.10.29.09.35.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 09:35:03 -0700 (PDT) From: Jens Axboe To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 08/29] scsi: provide mq_ops->busy() hook Date: Mon, 29 Oct 2018 10:34:23 -0600 Message-Id: <20181029163444.9940-9-axboe@kernel.dk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181029163444.9940-1-axboe@kernel.dk> References: <20181029163444.9940-1-axboe@kernel.dk> Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Only the SCSI legacy path provides a way to check if target is currently busy, provide the same for the MQ path. Cc: linux-scsi@vger.kernel.org Signed-off-by: Jens Axboe Reviewed-by: Hannes Reinecke --- drivers/scsi/scsi_lib.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index c7fccbb8f554..8b0345924a92 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1675,6 +1675,11 @@ static int scsi_lld_busy(struct request_queue *q) return 0; } +static bool scsi_mq_lld_busy(struct request_queue *q) +{ + return scsi_lld_busy(q); +} + /* * Kill a request for a dead device */ @@ -2326,6 +2331,7 @@ static const struct blk_mq_ops scsi_mq_ops = { .init_request = scsi_mq_init_request, .exit_request = scsi_mq_exit_request, .initialize_rq_fn = scsi_initialize_rq, + .busy = scsi_mq_lld_busy, .map_queues = scsi_map_queues, };