From owner-freebsd-current@FreeBSD.ORG Sun Jul 8 14:00:16 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1BC4D16A469 for ; Sun, 8 Jul 2007 14:00:16 +0000 (UTC) (envelope-from avatar@mmlab.cse.yzu.edu.tw) Received: from www.mmlab.cse.yzu.edu.tw (www.mmlab.cse.yzu.edu.tw [140.138.150.166]) by mx1.freebsd.org (Postfix) with ESMTP id DAC7A13C4C8 for ; Sun, 8 Jul 2007 14:00:15 +0000 (UTC) (envelope-from avatar@mmlab.cse.yzu.edu.tw) Received: by www.mmlab.cse.yzu.edu.tw (qmail, from userid 1000) id DC2658CA00D; Sun, 8 Jul 2007 22:00:14 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by www.mmlab.cse.yzu.edu.tw (qmail) with ESMTP id 9ECBB8C9D30; Sun, 8 Jul 2007 22:00:14 +0800 (CST) Date: Sun, 8 Jul 2007 22:00:14 +0800 (CST) From: Tai-hwa Liang To: Kostik Belousov In-Reply-To: <20070708024815.GK2200@deviant.kiev.zoral.com.ua> Message-ID: <0707082155317.77206@www.mmlab.cse.yzu.edu.tw> References: <20070703180141.GJ2200@deviant.kiev.zoral.com.ua> <20070705144443.GV2200@deviant.kiev.zoral.com.ua> <20070707160042.GJ2200@deviant.kiev.zoral.com.ua> <07070809441413.59322@www.mmlab.cse.yzu.edu.tw> <20070708024815.GK2200@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: current@freebsd.org Subject: Re: HEADS UP: destroy_dev_sched() KPI in the tree X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2007 14:00:16 -0000 On Sun, 8 Jul 2007, Kostik Belousov wrote: > On Sun, Jul 08, 2007 at 09:47:41AM +0800, Tai-hwa Liang wrote: [...] >> Though it was reviewed before destroy_dev_sched() KPI enters to the tree, >> I'd be appreciate it if you can reviewed the attached patch again. > So, this is still the problem for scsi_targ ? > > It probably make sense to postpone free of softc until all threads > finished using it. You may use destroy_dev_sched_cb() to run the > function after the device is actually destroyed. It would just call > free(). Probably; however, I did not see any code inside scsi_target.c to detach or unregister the scsi_target device. Will this cause any cdev leakage? -- Thanks, Tai-hwa Liang