From patchwork Thu Nov 5 06:09:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muneendra Kumar X-Patchwork-Id: 319696 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00, DATE_IN_PAST_06_12, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MIME_HEADER_CTYPE_ONLY,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, T_TVD_MIME_NO_HEADERS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7416C388F9 for ; Thu, 5 Nov 2020 13:03:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 600E82087D for ; Thu, 5 Nov 2020 13:03:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="O79wmu6w" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729992AbgKENDV (ORCPT ); Thu, 5 Nov 2020 08:03:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725468AbgKENDU (ORCPT ); Thu, 5 Nov 2020 08:03:20 -0500 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB57FC0613CF for ; Thu, 5 Nov 2020 05:03:20 -0800 (PST) Received: by mail-pl1-x643.google.com with SMTP id p4so762584plr.1 for ; Thu, 05 Nov 2020 05:03:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uDkQNsc6DsPsPKv2o21H94U+AHRU9KrNcFgTG8KcNPM=; b=O79wmu6wDX5n/8BwuAL9k2UOxXukdbjdxFvx/IolVP6mH16wn8eyN0UGjOGezS94om DaI8ibrqg/VmVIlbgfEThTAcTgK7wiR+Myi42carKNHdge8YGdLBQDmDBPzHgpQEDZ9+ 6kH9Q4/+ph97MwcEBzNs/rPK3koRYZDD/FyFc= 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=uDkQNsc6DsPsPKv2o21H94U+AHRU9KrNcFgTG8KcNPM=; b=TcX5COi9ndOhJM0PZ75yyS9t1oVeQVX7YrtFoo+pWucR89z4kIt63CXxrh3rNbHjcQ AntaTKxzfsBWCJJsT3w1ozlai1mQx/R+zBV+Mz8XzMePVDrw9YY8IZl7npnAjbNU0V/w uHQ/xsjEDoIf9hWD10XIiw+IqnzZ5rLii8pen/KmSpdVdjiNFub606crLtK1lQ8oMbHi 81PEH0XcKK6zBaHA2pk+utL60esqW6ADtgZMjM8+znV7AhXN1EwvRqmVPy+jsT2XDQhX pffLVQunTnaqebHuOzhjzr2SYpWTvEWUMoXAjKA+X54Kkjomk51wp2bZRGq+XiVy/ThH Pjrg== X-Gm-Message-State: AOAM532uozJiTiysKhfRH4TeAN28/BQBnPWQD0v0KVCflRYcbH4lbWz+ WfZ5O96UeNO/AORselGiY7NL0bLA2IwVxLPhP0bXsAgsoWiTUWW7Ardnscg/QQGttJUpv5Wl6TP Opsrf4EkqvBBE8Jeqy0JYAkraofEPPX6sHPnEPMhMt+udX4CUH79qO+kqhriSS8xl+ED5eNk/OP NyXYRUmmZ7qQ8= X-Google-Smtp-Source: ABdhPJwrnbDoIVOB1K0jspRhDaxYrDci6BJKYH3Lf0Exgh8pHACmV0gkjwpDsIH94l+ODUlzDz9cSg== X-Received: by 2002:a17:90b:3798:: with SMTP id mz24mr2302296pjb.46.1604581399763; Thu, 05 Nov 2020 05:03:19 -0800 (PST) Received: from localhost.localdomain ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id y141sm2491319pfb.17.2020.11.05.05.03.17 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Nov 2020 05:03:19 -0800 (PST) From: Muneendra To: linux-scsi@vger.kernel.org, michael.christie@oracle.com, hare@suse.de Cc: jsmart2021@gmail.com, emilne@redhat.com, mkumar@redhat.com, Muneendra Subject: [PATCH v6 1/4] scsi: Added a new definition in scsi_cmnd.h Date: Thu, 5 Nov 2020 11:39:53 +0530 Message-Id: <1604556596-27228-2-git-send-email-muneendra.kumar@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1604556596-27228-1-git-send-email-muneendra.kumar@broadcom.com> References: <1604556596-27228-1-git-send-email-muneendra.kumar@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Added a new definition SCMD_NORETRIES_ABORT in scsi_cmnd.h The SCMD_NORETRIES_ABORT defines the third bit postion in scmd->state Clearing the SCMD_NORETRIES_ABORT bit in state flag before blk_mq_start_request Signed-off-by: Muneendra --- v6: Rearranged the patch by merging first hunk of the patch2 in v5 to this patch v5: No Change v4: No Change v3: No change v2: Modified the commit log --- drivers/scsi/scsi_lib.c | 1 + include/scsi/scsi_cmnd.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 1a2e9bab42ef..2b5dea07498e 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1660,6 +1660,7 @@ static blk_status_t scsi_queue_rq(struct blk_mq_hw_ctx *hctx, req->rq_flags |= RQF_DONTPREP; } else { clear_bit(SCMD_STATE_COMPLETE, &cmd->state); + clear_bit(SCMD_NORETRIES_ABORT, &cmd->state); } cmd->flags &= SCMD_PRESERVED_FLAGS; diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 69ade4fb71aa..8dec4ec6bd5f 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -64,6 +64,9 @@ struct scsi_pointer { /* for scmd->state */ #define SCMD_STATE_COMPLETE 0 #define SCMD_STATE_INFLIGHT 1 +#define SCMD_NORETRIES_ABORT 2 /* If this bit is set then there won't be any + * retries of scmd on abort success + */ struct scsi_cmnd { struct scsi_request req;