From patchwork Sat Oct 20 16:45:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland Dreier X-Patchwork-Id: 10650563 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 B0D8413A9 for ; Sat, 20 Oct 2018 16:45:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 951092861E for ; Sat, 20 Oct 2018 16:45:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E6C62864B; Sat, 20 Oct 2018 16:45: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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 CDF242861E for ; Sat, 20 Oct 2018 16:45:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727590AbeJUA4M (ORCPT ); Sat, 20 Oct 2018 20:56:12 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:39005 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727543AbeJUA4M (ORCPT ); Sat, 20 Oct 2018 20:56:12 -0400 Received: by mail-pf1-f196.google.com with SMTP id c25-v6so17896147pfe.6 for ; Sat, 20 Oct 2018 09:45:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nPoRqCUtq87g4Q4OhMche08swLSS+gcvFhH4DUOPcG4=; b=BV/WqOIRQmtUYjjgicAO94K+k75fbGknM7NCBIVGIStwHqoJlY/lSzUtJnY2KyEAE0 qgO41t9FJwny3TywJB6ajMQp1LwmLTy+mmnvo2QXawWm2qu807VF21YppPRc+nsGMn2y O4o9s/yeDWNF6nYOlhX7hRPQ8emiAOjFdkDQY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=nPoRqCUtq87g4Q4OhMche08swLSS+gcvFhH4DUOPcG4=; b=UM6UeJxygvkHohEvz+/95VGRC3ahLeiOkDjwzCdODrO09Qzi6UGPum4cUcL4aWmpIP h2L7Lb0BvKj1nRdxFtfVLb8sYn/EcLB+4PlTwCs0V6swwY3odCep9TSvlMWS6glqi9wW T7xxkpawMcyF0vV+eWcP1x6icx05m4OdeLfZSjsGW/DbDSvlNyfMTUXZ8J/zKIvlEiMx dUxGu8A+jInTId3okyoWJBrc3jrG7Q87hZnRBKxKJyPDujI1iXfsKNYz9TIwURGcOYQj CAj+cJJaZhox84+pPLT34u4emWMYpKKl5UyhfGSCT6aaD6Q1B2H8JVi3PQXS2RC3P6aq qEMQ== X-Gm-Message-State: ABuFfog8TvxC74vQy2m+V6fBLIHlS+xEziYvCIx5l7eUSNKacrAjlauC pzk0chQ+LAVrrvQcaQ5+ozTQIg== X-Google-Smtp-Source: ACcGV60jOLxG8vl4nc+tR3lz6owbY91OflCqX/ARRnJA1/cp6DHAtjErw0MM7/zhyyefJMaAQgXEfw== X-Received: by 2002:a63:4904:: with SMTP id w4-v6mr36752591pga.303.1540053909532; Sat, 20 Oct 2018 09:45:09 -0700 (PDT) Received: from roland-x1-yoga.digitalvampire.org ([2601:647:4600:7ac7:fd39:320b:21cd:f739]) by smtp.gmail.com with ESMTPSA id a64-v6sm34270014pfe.32.2018.10.20.09.45.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Oct 2018 09:45:08 -0700 (PDT) From: Roland Dreier To: "Martin K . Petersen" , "Nicholas A . Bellinger" Cc: Christoph Hellwig , target-devel@vger.kernel.org Subject: [PATCH 1/2] target: Set response length for REPORT TARGET PORT GROUPS Date: Sat, 20 Oct 2018 09:45:04 -0700 Message-Id: <20181020164504.8644-1-roland@kernel.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 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 From: Roland Dreier One more place where we can return the length we actually fill in. Signed-off-by: Roland Dreier Reviewed-by: Christoph Hellwig --- drivers/target/target_core_alua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c index e46ca968009c..4f134b0c3e29 100644 --- a/drivers/target/target_core_alua.c +++ b/drivers/target/target_core_alua.c @@ -268,7 +268,7 @@ target_emulate_report_target_port_groups(struct se_cmd *cmd) } transport_kunmap_data_sg(cmd); - target_complete_cmd(cmd, GOOD); + target_complete_cmd_with_length(cmd, GOOD, rd_len + 4); return 0; }