From owner-freebsd-current@FreeBSD.ORG Wed Apr 4 10:03:55 2007 Return-Path: X-Original-To: freebsd-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 EF13516A402 for ; Wed, 4 Apr 2007 10:03:55 +0000 (UTC) (envelope-from ale@FreeBSD.org) Received: from andxor.it (relay.andxor.it [195.223.2.3]) by mx1.freebsd.org (Postfix) with SMTP id 1AF8513C457 for ; Wed, 4 Apr 2007 10:03:54 +0000 (UTC) (envelope-from ale@FreeBSD.org) Received: (qmail 76170 invoked from network); 4 Apr 2007 10:03:51 -0000 Received: from unknown (HELO ?192.168.2.5?) (192.168.2.5) by andxor.it with SMTP; 4 Apr 2007 10:03:51 -0000 Message-ID: <46137807.4060203@FreeBSD.org> Date: Wed, 04 Apr 2007 12:03:51 +0200 From: Alex Dupre User-Agent: Mozilla Thunderbird 1.5.0.10 (X11/20070317) MIME-Version: 1.0 To: Scott Long References: <46126585.8080204@FreeBSD.org> <46127DF4.5080703@samsco.org> <461285E0.8000008@FreeBSD.org> <7579f7fb0704031332o64d0637coe17770971d5a6e29@mail.gmail.com> <4612C873.1020505@samsco.org> <4612D49C.8040100@samsco.org> In-Reply-To: <4612D49C.8040100@samsco.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Matthew Jacob , freebsd-current@freebsd.org, freebsd-scsi@freebsd.org Subject: Re: targclose doesn't return 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: Wed, 04 Apr 2007 10:03:56 -0000 Scott Long ha scritto: > Actually, I think it's a wildly incorrect use of the clone API. Hmm, I don't think scsi_target uses the clone API. Yes, probably it should or at least it will be better, but the problem will remain. From what I've understood we cannot call destroy_dev directly from d_close. The solutions I see are: - use the destroy_dev_sched function posted by Kostik - remove the device externally, after closing it (like other clonable devices already do) The latter approach probably needs some redesign of the scsi_target code, while the first should be simpler if it works as expected (perhaps we should handle in a different way an open() to a closed but not already destroyed device, dunno). > I'll > take a look at in the in next few days and try to commit something that > works. Thanks for your support. I'm available to help (as much as I'm able) and test patches. -- Alex Dupre