From patchwork Wed Feb 8 22:24:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9563671 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 266126020F for ; Wed, 8 Feb 2017 22:28:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDB98284F2 for ; Wed, 8 Feb 2017 22:28:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E29922852C; Wed, 8 Feb 2017 22:28:25 +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.9 required=2.0 tests=BAYES_00,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 959BF284F2 for ; Wed, 8 Feb 2017 22:28:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751449AbdBHW2M (ORCPT ); Wed, 8 Feb 2017 17:28:12 -0500 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:63863 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751355AbdBHW1y (ORCPT ); Wed, 8 Feb 2017 17:27:54 -0500 X-IronPort-AV: E=Sophos;i="5.35,348,1483977600"; d="scan'208";a="76618189" Received: from unknown (HELO milsmgep14.sandisk.com) ([63.163.107.225]) by ob1.hgst.iphmx.com with ESMTP; 09 Feb 2017 06:28:21 +0800 Received: from MILHUBIP04.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id A5.72.18895.BCA9B985; Wed, 8 Feb 2017 14:25:15 -0800 (PST) Received: from milsmgip12.sandisk.com (10.177.9.6) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.319.2; Wed, 8 Feb 2017 14:25:11 -0800 X-AuditID: 0ac94371-0fadb980000049cf-fa-589b9acb15db Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id F0.42.18148.7CA9B985; Wed, 8 Feb 2017 14:25:11 -0800 (PST) From: Bart Van Assche To: Bart Van Assche CC: , Christoph Hellwig , Andy Grover , David Disseldorp Subject: [PATCH v4 11/37] target: Correct transport_wait_for_tasks() documentation Date: Wed, 8 Feb 2017 14:24:41 -0800 Message-ID: <20170208222507.25715-12-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170208222507.25715-1-bart.vanassche@sandisk.com> References: <20170208222507.25715-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOLMWRmVeSWpSXmKPExsXCddJ5ke7pWbMjDNb+0rLYP+sZk8XX/9NZ LFauPspk0br0LZMDi8fumw1sHu/3XWXz2Hy62uPzJrkAligum5TUnMyy1CJ9uwSujO4Hv1gK tnJV/H24jamB8TVHFyMnh4SAicSLg1PYuhi5OIQEljJJ7OxZAuVsZZR41HuKDabq+L2pUImN jBJXprWwgCTYBIwkvr2fCWaLCBhI/O69wAhSxCzQwSgxv+cZK0hCWCBIYuPeNWBFLAIqEve/ z2UCsXkFHCQ+dE9mh9ggL7Gr7SJYPSdQfMLLZ4wgtpCAvcSrA1/AhkoItLFKrDj5mA2iWVDi 5MwnYEOZBSQkDr54wQzRoC5xcsl8pgmMQrOQlM1CUraAkWkVo1huZk5xbnpqgaGJXnFiXkpm cbZecn7uJkZIcBfuYHx92/sQowAHoxIP7wXr2RFCrIllxZW5hxglOJiVRHhTpgGFeFMSK6tS i/Lji0pzUosPMUpzsCiJ82bJTo0QEkhPLEnNTk0tSC2CyTJxcEo1MB7hN/5k+uWMUoWQoeWt LWe7O7TPbubLV3bQ3fliWdNFoafWgskSXWsbpF5w6K7cOC8zc1LzkoOLuG4cSYqonnTQoiK/ XqXn3W6ro43hy6yZLxWVhyanss+MEsgr7jAwnJl8uVGsWUrscsPM1asYsrLrxKqkaphk/07f eblFWKZHO0s/Vk9aiaU4I9FQi7moOBEAEuD+S2oCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGJMWRmVeSWpSXmKPExsXCtZGTTff4rNkRBssWKFvsn/WMyeLgzzZG i6//p7NYrFx9lMmidelbJgdWj903G9g83u+7yuYxbc15Jo/Np6s9Pm+SC2CN4rJJSc3JLEst 0rdL4MrofvCLpWArV8Xfh9uYGhhfc3QxcnJICJhIHL83la2LkYtDSGA9o8Seiy3sIAk2ASOJ b+9nsoDYIgIGEr97LzCCFDELdDFKbDpzCqxIWCBIYuPeNWBFLAKqEisvPgGL8wo4SDz5spYF YoO8xK62i6wgNidQfMLLZ4wgtpCAvcSrA18YJzByL2BkWMUolpuZU5ybnllgaKRXnJiXklmc rZecn7uJERISUTsYr080P8TIxMEp1cC4yJhnzVHpCpaQjy9Z/G6/PaP8wtrQ03/mejXR6a/5 9PlLPiyz+b2+eOXU/wvvf0yUfSS+dKVC4IW4jNrj652Pz+/9c+9ItkmM41ULt1WCqTMM3WuV 70Vd6pU8WNZga/ai0923Tjq+jEfM5lGMHGfjrKm3WHf+kj1RdefXlybW1RU3KrN+7hZSYinO SDTUYi4qTgQAlk1u2LkBAAA= 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 transport_wait_for_tasks() not only waits for command completion but also sets CMD_T_STOP. Additionally, this function is not only called by frontend drivers but also by the target core. Update the transport_wait_for_tasks() documentation to reflect this. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Cc: Christoph Hellwig Cc: Andy Grover Cc: David Disseldorp --- drivers/target/target_core_transport.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 72fd0b430380..2d651f28e90d 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -2765,11 +2765,8 @@ __transport_wait_for_tasks(struct se_cmd *cmd, bool fabric_stop, } /** - * transport_wait_for_tasks - wait for completion to occur - * @cmd: command to wait - * - * Called from frontend fabric context to wait for storage engine - * to pause and/or release frontend generated struct se_cmd. + * transport_wait_for_tasks - set CMD_T_STOP and wait for t_transport_stop_comp + * @cmd: command to wait on */ bool transport_wait_for_tasks(struct se_cmd *cmd) {