Re: Linux kernel: delay before power-off

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Am 23.01.23 um 17:40 schrieb Friedrich Romstedt:

Can you maybe detail a little the actual symptoms of these unsafe
shutdowns?

The post I linked to explains the problem rather well. Devices are sent a stop/shutdown message shortly before the system is losing power. The devices acknowledge these messages and the system is halted, rebooted or powered off. What I can see, despite everything working as written, is that filesystems that care to report it (f2fs) sometimes are left in a state like after a sudden power loss, while the system reported a proper shutdown. Other filesystems are less noisy about this, simply replaying their (imcomplete) journal, and rarely losing some files. I have seen the latter after a heavy `pacman -Syu` followed by an immediate shutdown.

One might wonder why this happens, after a disk acknowledged the shutdown message. I can only speculate. Of course the message/acknowledgement cycle comes with a timeout. Maybe it is sometimes too short for disks with large RAM-caches or complicated data management schemes. This is only a problem when write caches are filled before power-off, so developers may opt to send that acknowledgement in time and hope for the best, instead of triggering error messages that may make the drive look bad.

As this is a race condition depending on a lot of random timings and cheap SSDs have no RAM nowadays, this all is probably not a real problem to most users.

BR



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux