From owner-freebsd-arch@FreeBSD.ORG Mon Sep 13 16:22:48 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E286316A4CE for ; Mon, 13 Sep 2004 16:22:48 +0000 (GMT) Received: from athena.softcardsystems.com (mail.softcardsystems.com [12.34.136.114]) by mx1.FreeBSD.org (Postfix) with ESMTP id 596DA43D4C for ; Mon, 13 Sep 2004 16:22:48 +0000 (GMT) (envelope-from sah@softcardsystems.com) Received: from athena (athena [12.34.136.114])i8DHMamK007356 for ; Mon, 13 Sep 2004 12:22:36 -0500 Date: Mon, 13 Sep 2004 12:22:36 -0500 (EST) From: Sam X-X-Sender: sah@athena To: freebsd-arch@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: 4.x device failure? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2004 16:22:49 -0000 Hello, I'm testing out my AoE driver and have a question about how to handle device failure. I have a function, aoedev_down, that fails all outstanding bufs and if the device is currently open, calls disk_invalidate and flags the device for destruction on close. This function is also called on module unload, once per device. The module unload will wait until all devices are closed before returning. The test I'm running is to mount an AoE device and unload the AoE module. The mount persists (while AoE unload waits) and upon umount I get a panic and eventual hang syncing disks. I would have thought that calling disk_invalidate would cause anyone depending on that disk to see it as gone, but that's apparently not so. I never see the close. Surely there's a way to pull a disk out from under those that have it open without a panic? Opinions? Cheers, Sam