From patchwork Mon Oct 15 15:51:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10642083 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5873C3B73 for ; Mon, 15 Oct 2018 15:52:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 490A429A48 for ; Mon, 15 Oct 2018 15:52:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3CEEE29A4C; Mon, 15 Oct 2018 15:52:13 +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.5 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,URIBL_ABUSE_SURBL autolearn=ham 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 E447C29D2D for ; Mon, 15 Oct 2018 15:52:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726515AbeJOXiA (ORCPT ); Mon, 15 Oct 2018 19:38:00 -0400 Received: from out002.mailprotect.be ([83.217.72.86]:41867 "EHLO out002.mailprotect.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726557AbeJOXh7 (ORCPT ); Mon, 15 Oct 2018 19:37:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mailprotect.be; s=mail; h=Content-Transfer-Encoding:MIME-Version:References :In-Reply-To:Message-Id:Date:Subject:Cc:To:From:reply-to:sender:bcc: content-type; bh=ypJQnNBfdznwlWrKZVEFW9hdqPPiIvgLDoZb0EXHk5c=; b=GNC6aS7Em2MD dVcIMawrKy/t9zvUHuL7K3dYKkouUc5FEKdJPs+nK1ucvOR24h6MPdB3tK6CdDj+vXNS/afB53tiD ZtNge2LKLPIEMyYPmFLrgf/alWUwMEUXyhN97UZgnvJzvWszw7/uZx5kMhprc7IRyG6MJsyMcrii+ uZ9BNNLtURs0VaUoh+jXTWyiUymj22qVj5FmMIv342nBOtQbdLTYOn3IJmpOVmcNZbaLjsYTk2SCy TKLTCZ20Kznig+e1gqICBcyBqmrj7iTmlsh+5MC3SkYT5TkV9anjNszb9HCBsEu1yOvh1iNGqHGR/ 5shQewimQbLwgiUjGS4MFQ==; Received: from smtp-auth.mailprotect.be ([178.208.39.155]) by com-mpt-out002.mailprotect.be with esmtp (Exim 4.89) (envelope-from ) id 1gC5A2-0009Xp-CH; Mon, 15 Oct 2018 17:52:03 +0200 Received: from desktop-bart.svl.corp.google.com (unknown [104.133.8.89]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-auth.mailprotect.be (Postfix) with ESMTPSA id A3FCBC0A4D; Mon, 15 Oct 2018 17:51:53 +0200 (CEST) From: Bart Van Assche To: "Martin K . Petersen" Cc: Christoph Hellwig , target-devel@vger.kernel.org, Bart Van Assche , Nicholas Bellinger , Mike Christie , Hannes Reinecke Subject: [PATCH 3/6] target/core: Remove the SCF_COMPARE_AND_WRITE_POST flag Date: Mon, 15 Oct 2018 08:51:36 -0700 Message-Id: <20181015155139.143446-4-bvanassche@acm.org> X-Mailer: git-send-email 2.19.0.605.g01d371f741-goog In-Reply-To: <20181015155139.143446-1-bvanassche@acm.org> References: <20181015155139.143446-1-bvanassche@acm.org> MIME-Version: 1.0 X-Originating-IP: 178.208.39.155 X-SpamExperts-Domain: mailprotect.be X-SpamExperts-Username: 178.208.39.128/27 Authentication-Results: mailprotect.be; auth=pass smtp.auth=178.208.39.128/27@mailprotect.be X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: Combined (0.03) X-Recommended-Action: accept X-Filter-ID: EX5BVjFpneJeBchSMxfU5hzHtcFiJa06ohiXCXv39CN602E9L7XzfQH6nu9C/Fh9KJzpNe6xgvOx q3u0UDjvO1tLifGj39bI0bcPyaJsYTagCTS5H5Pie2sCQ3gGSzr06cM7U7xDGmYwNG93LVnxwxjk yGQYCd08t3lHobjxX/OigDGQOIiVUN5rGO3B5zfVpnsdsF0/474T9aStD4uEKVG9P9yTThxC66Ku Xb0HO3WlZa4xKvcBORT2AGmYYKfacHGRHPT1S45qX7/AQuG3+Xws3TRjaC42FtNJuTWwh7zLjlV5 cBkg2E15FOz6ftN79i75W4x5csPOIuAA23CVYc902MBxp+G42GIBqokZAnJ5xBHkCMCjMposz65/ e+f6sz9VtXrOJenZ5zYaF/sdP+70pheH5TNN6RiG9N0Jt+0ML5i3g2GFaGQnZ3KowlU8anvoc7s0 eHtsyrH7f4vWsxE/6wnSTdYMIbg1/h42t37X7D3r+yzaf09FesHDYiVh+mW6KLAhhg63cf8hhJ+u kSXGkMRHqahP8I2z5Z6Oaau3r5afqv7IHvnvd2pvgvBc+yIcNf9mmCdHYvplLFSG4KBSfNBRSHvO tj6BxxAeW8VFuiO6yCEAclVLBw8e/TPckDkXGJvniGivX1Fq/UQDdfRWNiJbKFZUCBFMj3aVfRTy mM4V+dYvw3zgaX5MC+SYhClGQqBaLo/4e5RWTejdpMF40MajfsURz8L4dmQLKmXZ4ciB+h1c4Cwq mt5tbitpbYxvJ34ZFW/Nsw5JzXRzZN/ikV9jw84fBBX1DO528i7UL1JgezUdWQ05VsGirfnatW1x D7NPHFVkxC5YVnU16UjwG05S+hO4GQ05Y/WP30Hdn+cousT5+gFGAcOaNJ6l53AchVbc0JpeNrhF rx64zcw4Oh2LkwsmIC+tUiJAU2GWfmVpiJkOE4Udd79N8qTYYxTI82mpOPXOi/+eVvRjMBxwEiTV JqDh0qKoKsXx5lnwVAtFIjOqBVBmDBo6d1b4QpW0dpxIo9d2WgcHzHNTu4W3OyTlA5uhTP73RN8y cSzpfj5sSQhb3cc4IkKXIhy+I6DM7/owTL8J95f1/+MXnOL6CZv+n8/wRksD+x9JjG1O+eyolGM4 l8rlxuGfhU+34hrNm42X2UZAYRVVEuFqpn0Wcxxec4eIhtK5Pi2eqhlDMrilbtDDvtO4rayUOwaR X-Report-Abuse-To: spam@com-mpt-mgt001.mailprotect.be Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 057085e522f8 ("target: Fix race for SCF_COMPARE_AND_WRITE_POST checking") removed the code that checks the SCF_COMPARE_AND_WRITE_POST flag. Hence also remove the flag itself. Cc: Nicholas Bellinger Cc: Mike Christie Cc: Christoph Hellwig Cc: Hannes Reinecke Signed-off-by: Bart Van Assche --- drivers/target/target_core_sbc.c | 6 ------ include/target/target_core_base.h | 1 - 2 files changed, 7 deletions(-) diff --git a/drivers/target/target_core_sbc.c b/drivers/target/target_core_sbc.c index ebac2b49b9c6..f2c3b67dbb36 100644 --- a/drivers/target/target_core_sbc.c +++ b/drivers/target/target_core_sbc.c @@ -425,14 +425,8 @@ static sense_reason_t compare_and_write_post(struct se_cmd *cmd, bool success, struct se_device *dev = cmd->se_dev; sense_reason_t ret = TCM_NO_SENSE; - /* - * Only set SCF_COMPARE_AND_WRITE_POST to force a response fall-through - * within target_complete_ok_work() if the command was successfully - * sent to the backend driver. - */ spin_lock_irq(&cmd->t_state_lock); if (cmd->transport_state & CMD_T_SENT) { - cmd->se_cmd_flags |= SCF_COMPARE_AND_WRITE_POST; *post_ret = 1; if (cmd->scsi_status == SAM_STAT_CHECK_CONDITION) diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 7a4ee7852ca4..e3bdb0550a59 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -138,7 +138,6 @@ enum se_cmd_flags_table { SCF_ALUA_NON_OPTIMIZED = 0x00008000, SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC = 0x00020000, SCF_COMPARE_AND_WRITE = 0x00080000, - SCF_COMPARE_AND_WRITE_POST = 0x00100000, SCF_PASSTHROUGH_PROT_SG_TO_MEM_NOALLOC = 0x00200000, SCF_ACK_KREF = 0x00400000, SCF_USE_CPUID = 0x00800000,