Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Documentation: sysrq: don't recommend 'S' 'U' before 'B'

This advice is obsolete and slightly harmful for filesystems from this
millenium: any modern filesystem can handle unexpected crashes without
requiring fsck -- and on the other hand, trying to write to the disk when
the kernel is in a bad state risks introducing corruption.

For ext2, any unsafe shutdown meant widespread breakage, but it's no longer
a reasonable filesystem for any non-special use.

Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Adam Borowski and committed by
Jonathan Corbet
209c3aa7 c193a3ff

+9 -11
+9 -11
Documentation/admin-guide/sysrq.rst
··· 171 171 useful when you want to exit a program that will not let you switch consoles. 172 172 (For example, X or a svgalib program.) 173 173 174 - ``reboot(b)`` is good when you're unable to shut down. But you should also 175 - ``sync(s)`` and ``umount(u)`` first. 174 + ``reboot(b)`` is good when you're unable to shut down, it is an equivalent 175 + of pressing the "reset" button. 176 176 177 177 ``crash(c)`` can be used to manually trigger a crashdump when the system is hung. 178 178 Note that this just triggers a crash if there is no dump mechanism available. 179 179 180 - ``sync(s)`` is great when your system is locked up, it allows you to sync your 181 - disks and will certainly lessen the chance of data loss and fscking. Note 182 - that the sync hasn't taken place until you see the "OK" and "Done" appear 183 - on the screen. (If the kernel is really in strife, you may not ever get the 184 - OK or Done message...) 180 + ``sync(s)`` is handy before yanking removable medium or after using a rescue 181 + shell that provides no graceful shutdown -- it will ensure your data is 182 + safely written to the disk. Note that the sync hasn't taken place until you see 183 + the "OK" and "Done" appear on the screen. 185 184 186 - ``umount(u)`` is basically useful in the same ways as ``sync(s)``. I generally 187 - ``sync(s)``, ``umount(u)``, then ``reboot(b)`` when my system locks. It's saved 188 - me many a fsck. Again, the unmount (remount read-only) hasn't taken place until 189 - you see the "OK" and "Done" message appear on the screen. 185 + ``umount(u)`` can be used to mark filesystems as properly unmounted. From the 186 + running system's point of view, they will be remounted read-only. The remount 187 + isn't complete until you see the "OK" and "Done" message appear on the screen. 190 188 191 189 The loglevels ``0``-``9`` are useful when your console is being flooded with 192 190 kernel messages you do not want to see. Selecting ``0`` will prevent all but