Received: by 2002:ac0:a874:0:0:0:0:0 with SMTP id c49csp259431ima; Fri, 15 Mar 2019 02:08:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqzsWGypOMXaJ3KgAnJUS8ZxYuFUhctRob+KR53u25bA38y5EvxBSfISsm+lUDLrqgDhlUtC X-Received: by 2002:a17:902:a511:: with SMTP id s17mr3080274plq.262.1552640935309; Fri, 15 Mar 2019 02:08:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552640935; cv=none; d=google.com; s=arc-20160816; b=0lGuE1sc9u7V2GNypHE4DQrcRWUCzO0YosWmqdwiVeQZto8u9/z7RZf5a6PGTo62sb 6iy+Nq6dacL6JyeDnomsCKLFUwtns/vBi7qoK7+yLnj+TIQzox8gdb535pCmioQMfSy9 aVeOomFB19IecKt13UnI7Nibv/uRrvw8FQSloLm6ErMnUW3MpL5SuZWGOLgClC9yx2nR cvAESuPG+zn6rrXbGos6tP6rob3mtPRFLVzMZ4itDNFriciRd5+DsMdFCQOPMu2AwgKx OjewfclCmCy1/7JpmUS2Nm6LrWpUN7xZEl4hzsRNNe0vY30HUTYlewZ7rUm8rQRbPseV EkHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=hodO79sVdUVbs8R2wgveaoHWI6y3it+JXm1fmyjQDVk=; b=bivwZC+IyqGTTKAuhot+Fz/KnrVgNlaQu4kE2dDx97kosxRrpeinXjLRbjqsdjxGkl IOk/t4F5y2cOkzRNj2Mr6GoJJbFhBGWYnlcufFfgpcUecXWTqAJLial1a7HXSq1i414j KLYr+369SU3YDWF6tBa1v258U2mN5frrw7BTzxmIASF6fEN/B/wTE1JfKn6kvm1OcVKR mkcr5c2o+2FImn/K9gKfAtmb2reQKnNKvcrkHf4qhWo9ppkYJPzhWS3imGaP9Z9LXaXp Vdgq0z4188qdXSy4h8xfMbKTsP543pLgCgwiK63qZFdhH0M/uwtkg7OzU/MCmbz/1L/K xNSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=xqP793vY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p2si1462530pfi.103.2019.03.15.02.08.40; Fri, 15 Mar 2019 02:08:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=xqP793vY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728753AbfCOJHc (ORCPT + 99 others); Fri, 15 Mar 2019 05:07:32 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:50544 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728644AbfCOJGt (ORCPT ); Fri, 15 Mar 2019 05:06:49 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x2F8xImn020939; Fri, 15 Mar 2019 09:06:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2018-07-02; bh=hodO79sVdUVbs8R2wgveaoHWI6y3it+JXm1fmyjQDVk=; b=xqP793vYQW7JOCT2ovXf0NeKSjjV6Sk1vbWBMc5KCIqFzaaWcWjxPhN64zTOSSVBd2V+ KypriZ9GXCMVv1PmuqpDuA+wBvsUbajU/FDam8RBe8pUXDW6jCQL7MayLe/La3L4T219 /48pkhDmxnU7ch2QlJDXhd4H73t1SpTVWwehhNTuLzeraQPltvG+eBfPnb6hYfunlmkI tvQKJXre8anR0Bn8g35omJdWXe7PNLs8nqU7LvtVn4DLJ8tOeuvDtHDrRGQ8xrwT8EBD EMvifZ/1sIAz2RvmC1E+KgJHqCwLaNzG7QPEP+7ylKKjx85axOlrFvNjoM1m4RlQXrZU dA== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2r44wunjte-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Mar 2019 09:06:28 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x2F96RjV006011 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Mar 2019 09:06:27 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x2F96Rit017635; Fri, 15 Mar 2019 09:06:27 GMT Received: from will-ThinkCentre-M93p.cn.oracle.com (/10.182.71.12) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 15 Mar 2019 09:06:27 +0000 From: Jianchao Wang To: axboe@kernel.dk Cc: hch@lst.de, jthumshirn@suse.de, hare@suse.de, josef@toxicpanda.com, bvanassche@acm.org, sagi@grimberg.me, keith.busch@intel.com, jsmart2021@gmail.com, linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/8] skd: use blk_mq_queue_tag_busy_iter Date: Fri, 15 Mar 2019 16:57:42 +0800 Message-Id: <1552640264-26101-7-git-send-email-jianchao.w.wang@oracle.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1552640264-26101-1-git-send-email-jianchao.w.wang@oracle.com> References: <1552640264-26101-1-git-send-email-jianchao.w.wang@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9195 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903150067 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org blk_mq_tagset_busy_iter is not safe that it could get stale request in tags->rqs[]. Use blk_mq_queue_tag_busy_iter here. Signed-off-by: Jianchao Wang --- drivers/block/skd_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c index ab893a7..60c34ff 100644 --- a/drivers/block/skd_main.c +++ b/drivers/block/skd_main.c @@ -395,7 +395,7 @@ static int skd_in_flight(struct skd_device *skdev) { int count = 0; - blk_mq_tagset_busy_iter(&skdev->tag_set, skd_inc_in_flight, &count); + blk_mq_queue_tag_busy_iter(skdev->queue, skd_inc_in_flight, &count, true); return count; } @@ -1916,7 +1916,7 @@ static bool skd_recover_request(struct request *req, void *data, bool reserved) static void skd_recover_requests(struct skd_device *skdev) { - blk_mq_tagset_busy_iter(&skdev->tag_set, skd_recover_request, skdev); + blk_mq_queue_tag_busy_iter(skdev->queue, skd_recover_request, skdev, true); } static void skd_isr_msg_from_dev(struct skd_device *skdev) -- 2.7.4