From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.hgst.iphmx.com ([68.232.143.124]:28831 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751769AbdEEPAl (ORCPT ); Fri, 5 May 2017 11:00:41 -0400 From: Bart Van Assche To: "hch@lst.de" CC: "ddiss@suse.de" , "hare@suse.com" , "target-devel@vger.kernel.org" , "agrover@redhat.com" , "nab@linux-iscsi.org" , "stable@vger.kernel.org" Subject: Re: [PATCH 03/19] target: Avoid that aborting a command sporadically hangs Date: Fri, 5 May 2017 15:00:37 +0000 Message-ID: <1493996435.2744.1.camel@sandisk.com> References: <20170504225102.8931-1-bart.vanassche@sandisk.com> <20170504225102.8931-4-bart.vanassche@sandisk.com> <20170505085355.GC4858@lst.de> In-Reply-To: <20170505085355.GC4858@lst.de> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: On Fri, 2017-05-05 at 10:53 +0200, Christoph Hellwig wrote: > But as a further step can we try to move the waiting behavior entirely > into the caller that actually cares, >=20 > e.g. move the conditional target_wait_free_cmd before the call > to transport_generic_free_cmd in transport_generic_free_cmd, > and move this second wait_for_completion after the > transport_generic_free_cmd call based on an indicator (return value > or se_cmd flag)? Hello Christoph, That sounds like a good idea to me, especially since there are only three target drivers that set the "wait_for_tasks" argument to true, namely tcm_loop, the iSCSI target driver and the xen-scsiback driver. Bart.=