From patchwork Mon Jul 10 08:45:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Yi X-Patchwork-Id: 9832589 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1592E60318 for ; Mon, 10 Jul 2017 08:45:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0890A27FB7 for ; Mon, 10 Jul 2017 08:45:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F18082844C; Mon, 10 Jul 2017 08:45:28 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 9657027FB7 for ; Mon, 10 Jul 2017 08:45:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753823AbdGJIp2 (ORCPT ); Mon, 10 Jul 2017 04:45:28 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:33450 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753624AbdGJIp1 (ORCPT ); Mon, 10 Jul 2017 04:45:27 -0400 Received: by mail-pf0-f196.google.com with SMTP id e199so13606661pfh.0 for ; Mon, 10 Jul 2017 01:45:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=Zq/so6AGdk6+s6PLNoT1eRhmV1BBCujuKSjWZUCQbdA=; b=D8r5K3aekyH6mYE+P7Obc3BpIZXHqrFjusAzV8NrAg+TAI/o+XoIv31imVNQ0WUGNk 8jXsBC7s+6DkLZJ4QsQLSs6OHb6Oa2cwKluOw/REx0XBZJKMLlTgUpTRF1sTMikAte4r BPotR4DkjzuqJx+tnlrqGPLIp9JwR03okTpqupx9pGFnTt3Ya0LYmdnYSlKMA3wuA/oD JiaehmAruVH5DagK2Xg8NGvhFyeaLHBlNBTyVBr6c1MJZImaW59SC/wykDwKUdw5oO7U Rrt26AJh9icgRJrzj6ZxlnTVo+o36lVx9cBPJIPdXkNol4HuBsj4eIUpnf2bA0zZHnv6 xLow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=Zq/so6AGdk6+s6PLNoT1eRhmV1BBCujuKSjWZUCQbdA=; b=Ks5GGXjzcLIDz8cq9TjlEA6kHZ0e0eH7WZKB/akXau2BBdJceUGDLirLkXUFH35utG PBAxWuMtR2UWmDjC6ADlJ06Hjc6VHnUmpfFrj/mFDi4aJPzGp2k7FMd/wn2qjuO4Mzs+ rZ+skPAgyc6q4JB9EhahIxpxFP1oIY5NKm1FiEHkyJ3TUVFBrqfdAgLIzavZUns0FqAL xqKTH390nhAINxP0CYF3oOYp9vQXGz1ycCTY/m2JsZdni20LlcuwCZJGLEwnt099Mil8 QF0FKdjgAE2lj07l2xXxOc+Qg2RfmAqFeE+RQSN/1XVBt4hvk2s+fLLX6/bMZqeu2/Gd jDuQ== X-Gm-Message-State: AIVw110EHA++CNGxTa0jafQ+FVV7SJLznG7LEY7A5fpbXlkzGNzL7WbE nmYGaBErL6uGEhmjhyU= X-Received: by 10.84.198.67 with SMTP id o61mr16412164pld.98.1499676321599; Mon, 10 Jul 2017 01:45:21 -0700 (PDT) Received: from [10.12.12.133] (125-227-147-112.HINET-IP.hinet.net. [125.227.147.112]) by smtp.gmail.com with ESMTPSA id p15sm23111295pfi.99.2017.07.10.01.45.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jul 2017 01:45:21 -0700 (PDT) To: nab@linux-iscsi.org Cc: target-devel@vger.kernel.org From: Jiang Yi Subject: [PATCH] If the list ID is not supported, return TCM_UNSUPPORTED_SCSI_OPCODE Message-ID: <87df14ed-c47a-4186-db6e-ab4f96135416@gmail.com> Date: Mon, 10 Jul 2017 16:45:19 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 Content-Language: en-US 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 Hi Nic, To pass the "SCSI.ReceiveCopyResults.CopyStatus" test case of libiscsi test suite: ./libiscsi/test-tool/iscsi-test-cu --test=SCSI.ReceiveCopyResults.CopyStatus --verbose --Verbose-scsi --dataloss iscsi://${IP}:3260/${IQN}/0 I propose a patch: Signed-off-by: Jiang Yi --- drivers/target/target_core_xcopy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/target/target_core_xcopy.c b/drivers/target/target_core_xcopy.c index cac5a20..8654b10 100644 --- a/drivers/target/target_core_xcopy.c +++ b/drivers/target/target_core_xcopy.c @@ -1091,7 +1091,7 @@ sense_reason_t target_do_receive_copy_results(struct se_cmd *se_cmd) if (list_id != 0) { pr_err("Receive Copy Results with non zero list identifier" " not supported\n"); - return TCM_INVALID_CDB_FIELD; + return TCM_UNSUPPORTED_SCSI_OPCODE; } switch (sa) {