From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 27 01:54:24 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D468516A40F; Mon, 27 Nov 2006 01:54:24 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 127C843D58; Mon, 27 Nov 2006 01:53:26 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id kAR1s1AI033819; Sun, 26 Nov 2006 18:54:07 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <456A4536.2040904@samsco.org> Date: Sun, 26 Nov 2006 18:53:58 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.7) Gecko/20060910 SeaMonkey/1.0.5 MIME-Version: 1.0 To: Danny Braniss References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.org X-Mailman-Approved-At: Mon, 27 Nov 2006 02:02:33 +0000 Cc: freebsd-scsi@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: iSCSI/shutdown advice needed X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Nov 2006 01:54:24 -0000 Danny Braniss wrote: > hi, > I'm trying to finish up the iSCSI initiator, > and need some advice. To shutdown the initiator, I > need to: > 1- close down the CAM-peripherals, (ie da) > 2- empty up all pending iSCSI transactions > 3- close the tcp connection > 2 & 3 I can handle, it's 1 that im stuck. > Q: how can I call the peripheral close function, or is there > some CAM command? > I tried > xpt_async(AC_LOST_DEVICE, isp->cam_path, NULL); > but this it far to drastic, and actually will cause panic > if the device is still mounted. > > danny > UFS doesn't handle devices going away unexpectedly. Fixing it involves massive changes to both UFS and the VM system. However, sending the AC_LOST_DEVICE is probably the right thing to do. Scott