|
|
Log in / Subscribe / Register

Bcache: Caching beyond just RAM

Bcache: Caching beyond just RAM

Posted Jul 9, 2010 8:03 UTC (Fri) by MisterIO (guest, #36192)
Parent article: Bcache: Caching beyond just RAM

Is it safe in the presence of kernel bugs(or similar problems) for writes? I mean, we've seen things link ext4 delaying writes for 30 secs, but that had obvious relayability problems. Let's say that bcache successfully caches a certain amount of writes(that is they are complete on the cache), but then the system freezes, so the cache isn't written back to the actual hd. At the next boot, does bcache remember to perform those writes?


to post comments

Bcache: Caching beyond just RAM

Posted Jul 10, 2010 16:18 UTC (Sat) by MisterIO (guest, #36192) [Link]

Ooouuuh, it's so cold being alone in the shadow on winter!

Was my previous question very retarded? I noticed it's the only comment in the thread which was completely ignored. So I thought that knowing to have said something really stupid is still more useful than nothing. Thus, this post was born.

Bcache: Caching beyond just RAM

Posted Jul 10, 2010 20:32 UTC (Sat) by dlang (guest, #313) [Link] (2 responses)

if the data isn't written to the bcache HD and you do not have battery backed cache on the system, the data will be lost. This is the same as with any storage/filesystem.

however (once the write behind features are in bcache) once the data is written to the bcache storage it should push those changes back to the real device after the next boot. If it doesn't the write-behind feature can't be considered done and useable ;-)

Bcache: Caching beyond just RAM

Posted Jul 11, 2010 3:20 UTC (Sun) by koverstreet (✭ supporter ✭, #4296) [Link] (1 responses)

Yeah, that's all correct :)

Kernel bugs are a different matter entirely though - if a program doesn't do what you think it does, it could be doing anything. If it's buggy it could be overwriting all your important data with Rick Astley songs, or opening the door the the velociraptor cages. There's just no way to tell at that point.

You test everything as best you can, but software's complicated, there's always something lurking and no complete guarantees.

Bcache: Caching beyond just RAM

Posted Jul 12, 2010 0:14 UTC (Mon) by MisterIO (guest, #36192) [Link]

Well, with kernel bugs I meant kernel bugs not affecting this code and which by no means start writing random songs of some unknown guy(yeah, sorry, I don't know him) over your data, but still freeze the system. At that point basically the only real problem you could have is losing data on your hd(either just the data that didn't make it to the hd or the whole file you were writing at the time of the failure. The second case happened to me frequently with ext4 and I lost many normal data files because of it, while I was able instead to save some sources I was coding simply because I used git and I committed quite often).


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds