From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bart Van Assche Subject: Re: [PATCH 1/2] target: Fix LUN_RESET active I/O handling for ACK_KREF Date: Tue, 12 Jan 2016 08:32:48 -0800 Message-ID: <56952AB0.1070806@sandisk.com> References: <1452594245-921-1-git-send-email-nab@daterainc.com> <1452594245-921-2-git-send-email-nab@daterainc.com> <20160112152059.GB2294@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mail-bn1bn0100.outbound.protection.outlook.com ([157.56.110.100]:48212 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1761454AbcALQcy (ORCPT ); Tue, 12 Jan 2016 11:32:54 -0500 In-Reply-To: <20160112152059.GB2294@lst.de> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: Christoph Hellwig , "Nicholas A. Bellinger" Cc: target-devel , linux-scsi , Quinn Tran , Himanshu Madhani , Sagi Grimberg , Hannes Reinecke , Andy Grover , Nicholas Bellinger On 01/12/2016 07:20 AM, Christoph Hellwig wrote: >> It also introduces SCF_ACK_KREF to determine when >> transport_cmd_finish_abort() needs to drop the second >> extra reference, ahead of calling target_put_sess_cmd() >> for the final kref_put(&se_cmd->cmd_kref). > > It would be really useful to have all drivers follow that > ACK KREF model instead of needing to deal with driver > differences everywhere.. Hello Christoph, How about eliminating the TARGET_SCF_ACK_KREF flag ? If a command would only be freed upon the last target_put_sess_cmd() call then I think that the check_stop_free() callback wouldn't have to call target_put_sess_cmd() and hence that the TARGET_SCF_ACK_KREF flag could be removed. Bart.