From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from verein.lst.de ([213.95.11.211]:53757 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755129AbdEEIx5 (ORCPT ); Fri, 5 May 2017 04:53:57 -0400 Date: Fri, 5 May 2017 10:53:55 +0200 From: Christoph Hellwig To: Bart Van Assche Cc: Nicholas Bellinger , target-devel@vger.kernel.org, Hannes Reinecke , Christoph Hellwig , Andy Grover , David Disseldorp , stable@vger.kernel.org Subject: Re: [PATCH 03/19] target: Avoid that aborting a command sporadically hangs Message-ID: <20170505085355.GC4858@lst.de> References: <20170504225102.8931-1-bart.vanassche@sandisk.com> <20170504225102.8931-4-bart.vanassche@sandisk.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170504225102.8931-4-bart.vanassche@sandisk.com> Sender: stable-owner@vger.kernel.org List-ID: On Thu, May 04, 2017 at 03:50:46PM -0700, Bart Van Assche wrote: > For several target drivers (e.g. ib_srpt and ib_isert) sleeping inside > transport_generic_free_cmd() causes RDMA completion processing to stall. > Hence only sleep inside this function if the (iSCSI) target driver > requires this. This looks reasonable to me: Reviewed-by: Christoph Hellwig But as a further step can we try to move the waiting behavior entirely into the caller that actually cares, 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)?