Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2734383pxp; Tue, 22 Mar 2022 05:10:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwv6kgBlS/CVJJqJ4iwakC6msTDLmJQlUa+giQd4onsvocmPXq8Db5nuzXRsG6amro4aeiQ X-Received: by 2002:a63:69c7:0:b0:380:afc8:33be with SMTP id e190-20020a6369c7000000b00380afc833bemr21307432pgc.304.1647951054965; Tue, 22 Mar 2022 05:10:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647951054; cv=none; d=google.com; s=arc-20160816; b=wgCjhj+zzrxH5dvPPO/oSOpZjd+810D82pRLuhhvbxMKwv/EE53bhMz2TWkLKc77pS GXyVpZPd9iRfTcJC8YhfAuR0AA06yTJUuktl6liJ9vyMzKwoCx4nriHcc/xufKRUBuWd JPCXCPAIS8S5CdyqyyAQfBUGFwVq6Jkj/2XxWAI807kjsBbdTmX+5nnAXs1IeOM91Umn ybV5aLxUOeAF+wsv5X0GYxbAWwkH8DpH+lK0Ja2FJ8WbFLieoZ49/08RZ4ZS/kc34B3L +I9J0XIN4PWBgDIgGfkdF0lc4CNA5nsMlxREWF8jW3hKmqm11mO9QzRvlev6OAzuzoMq U/uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=p6eRFdwS7YaHINa4Di+0A1XzUVHkYlfuYFq00uSoQpU=; b=b2+6E2/077PqhRWaSXkFL0wigSKHjWewMYqB3cXTsBvsrGRhWGAcHuZ/oJk3jN6aUO MZSaMCIJ19wn++PKWkJh/LvshpQEEd8zAzQcpj+yNFTC7gIZ9odr87OudyBp+DgVWZVG 4qRzRO1r2L9epsi7i4YITjuaO5gwpTO9CvW4XNrbjVn4UDyke41fXI/Jd6ai116tomqx g+EzUm4a33aZZdJYFpE05TBuLfE6pDM7nJrrd6dU/4zUCW7HUmN0+5jMbfiCdWKgArz4 mpFv9fJKFUOCvQbZUUYT981gWgtsSHy09WKpQsg8wm9HkCrVOu+jIU3s2VDAzHQfAmwM Y+Ag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g134-20020a62528c000000b004fa3a8dffedsi9528701pfb.164.2022.03.22.05.10.41; Tue, 22 Mar 2022 05:10:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233473AbiCVKrY (ORCPT + 99 others); Tue, 22 Mar 2022 06:47:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233376AbiCVKrR (ORCPT ); Tue, 22 Mar 2022 06:47:17 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADA208149C; Tue, 22 Mar 2022 03:45:49 -0700 (PDT) Received: from fraeml702-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4KN7Pj2PG8z6853P; Tue, 22 Mar 2022 18:43:37 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml702-chm.china.huawei.com (10.206.15.51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2375.24; Tue, 22 Mar 2022 11:45:47 +0100 Received: from localhost.localdomain (10.69.192.58) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Tue, 22 Mar 2022 10:45:43 +0000 From: John Garry To: , , , , , , , CC: , , , , , , , John Garry Subject: [PATCH 02/11] scsi: core: Add SUBMITTED_BY_SCSI_CUSTOM_OPS Date: Tue, 22 Mar 2022 18:39:36 +0800 Message-ID: <1647945585-197349-3-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1647945585-197349-1-git-send-email-john.garry@huawei.com> References: <1647945585-197349-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.58] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a new type of submitter, SUBMITTED_BY_SCSI_CUSTOM_OPS, for when a SCSI cmnd is submitted via the block layer but not by scsi_queue_rq(). Since this is not a true SCSI cmnd we should do nothing for it in scsi_done_internal(). Signed-off-by: John Garry --- drivers/scsi/scsi_lib.c | 2 ++ include/scsi/scsi_cmnd.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index a7788184908e..d230392f2b4a 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1615,6 +1615,8 @@ static void scsi_done_internal(struct scsi_cmnd *cmd, bool complete_directly) return scsi_eh_done(cmd); case SUBMITTED_BY_SCSI_RESET_IOCTL: return; + case SUBMITTED_BY_SCSI_CUSTOM_OPS: + return; } if (unlikely(blk_should_fake_timeout(scsi_cmd_to_rq(cmd)->q))) diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 76c5eaeeb3b5..ad4bcace1390 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -64,6 +64,7 @@ enum scsi_cmnd_submitter { SUBMITTED_BY_BLOCK_LAYER = 0, SUBMITTED_BY_SCSI_ERROR_HANDLER = 1, SUBMITTED_BY_SCSI_RESET_IOCTL = 2, + SUBMITTED_BY_SCSI_CUSTOM_OPS = 3, } __packed; struct scsi_cmnd { -- 2.26.2