4.x device failure?

Sam sah at softcardsystems.com
Mon Sep 13 09:22:49 PDT 2004


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



More information about the freebsd-arch mailing list