summaryrefslogtreecommitdiff
path: root/sys/dev/dm/dm_table.c
diff options
context:
space:
mode:
authordyoung <dyoung@NetBSD.org>2009-06-26 23:40:27 +0000
committerdyoung <dyoung@NetBSD.org>2009-06-26 23:40:27 +0000
commitaeb6a78d821415817526377608b97ebbfbb33cc8 (patch)
treed12e3c757e25d44132f8f12ec0dcb0d975e50030 /sys/dev/dm/dm_table.c
parentb4f24be3560cf2aaaa50178a0d4ab8d09404b286 (diff)
During a normal shutdown, gracefully tear down arbitrary stacks of
filesystems and (pseudo-)devices, according to the algorithm at A3 and A4, below. Proposed and discussed at <http://mail-index.netbsd.org/tech-kern/2009/04/20/msg004864.html>. No objections. During an emergency shutdown (e.g., shutdown -n, or after a panic), shutdown is simple as always: filesystems are not sync'd or unmounted, and devices are not detached. It was necessary to change the order of operations during shutdown, but the new order is more sensible: if a core dump is desired, then cpu_reboot(9) dumps it first. cpu_reboot(9) does not call legacy shutdown hooks any longer: they can interfere with device detachment and PMF shutdown, and very few legacy hooks remain. Here is the old order of operations: B1 sync filesystems and TOD clock B2 unmount filesystems B3 dump core B4 detach devices B5 run legacy shutdown hooks B6 run PMF shutdown hooks B7 suspend interrupts B8 MD reboot/shutdown/powerdown And here is the new order: A1 dump core A2 sync filesystems and TOD clock A3 unmount one or more filesystems OR detach one or more devices OR forcefully unmount one filesystem OR skip to 5 A4 repeat at 3 A5 run PMF shutdown hooks A6 suspend interrupts A7 MD reboot/shutdown/powerdown Tested on Dell Dimension 3000, Dell PowerEdge 1950, Sun Fire V120, Soekris net4521 and net4801. VS: ----------------------------------------------------------------------
Diffstat (limited to 'sys/dev/dm/dm_table.c')
0 files changed, 0 insertions, 0 deletions