[haiku-development] Re: writeback (was: Re: Re: Haiku self-hosting.)

  • From: Thom Holwerda <slakje@xxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 1 Apr 2008 21:44:20 +0200


On 1 apr 2008, at 21:08, Luposian wrote:

But press F12 (enter Kernel Debug mode) and type one short word... "reboot". And hit [Enter].

The system reboots, and you go back into Haiku. Look for your files. ANY of them. It can be 1 file or a dozen of them... they're NOT THERE! Where'd they go?!? They went bye-bye. Why? Because, although EVERYTHING said they were put on the disk, nice and safe and secure... THEY WERE NEVER REALLY THERE!

Bad examples. Entering KDL and rebooting does not trigger a writeback, and thus, stuff can be out of sync. This makes perfect sense, as entering KDL *should* halt everything. If you do a normal shutdown or reboot sequence, the first order of business in that sequence is a writeback, syncing everything, making sure the problems you describe do not occur. Most operating systems out there do it this way, since it's a lot faster than doing things synchronously. That's a relatively important detail you're leaving out there (thanks to Rene for the details on this one).

You might argue that this interval needs changing (I have no idea), but that's a different issue.

Haiku is now self-hosting... tell me... what happens when someone configures all the files and folders in Haiku to be a development platform... and the system spontaneously reboots (I've had it happen several times, in the past, due to bad capacitors)? All your effort and work is GONE! What happens when you've downloaded ALL the files to the latest revision of Haiku and you're ready to Jam them... and the power goes out for a moment? ALL those files are GONE!!! What happens when you've taken the time to download and JAM the latest revision of Haiku (a couple hours, let's say) and someone trips over the power cord? You guessed it... ALL YOUR FILES AND WORK AND EFFORT AND TIME ARE TOAST!!!

Yeah well yanking out power cables while the computer is powered on and doing heavily file management is *never* a good idea - no matter the operating system being used. You're asking the devs to fix something that is essentially unfixable: power failures causing file corruption.


Thom

Other related posts: