tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: new shutdown order
> 1 Try to "gently" unmount all filesystems.
> 2 Try to detach all devices and pseudo-devices.
> 3 If step 1 or step 2 detached any device or filesystem, goto
> step 1. Otherwise, continue.
> 4 Try to forcefully unmount a filesystem.
> 5 Try to detach all devices and pseudo-devices.
> 6 If step 4 or step 5 detached any device or filesystem, goto
> step 4. Otherwise, end.
I would say goto step 1, not step 4, in step 6 - once you force an
unmount, a bunch more stuff may unstack without needing
sledgehammering.
As you point out in another message, you really want to pick the
"topmost" filesystem to force-unmount in step 4, but it's not at all
clear how to find that programmatically; something must be held active
or it would have unmounted gently, and it's not obvious how to
determine which is the best unmount to force.
Actually, it's not difficult, but it's fairly intrusive: just have all
disks that can stack on top of anything else (vnd, raid, ccd, etc)
provide an interface (a kernel-internal ioctl?) to somehow get a list
of the things (vnodes?) that they stack atop. Absent things such as my
hypothetical pathological tangled RAID hierarchy, this would allow you
to construct a tree and thus locate a leaf that ought to be unmountable
and thus is a prime candidate for forced unmount.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Home |
Main Index |
Thread Index |
Old Index