Making writes durable – is your data on disk?

Here is an interesting article written by Evan Jones. The article explains how you can be guaranteed when your data is on disk.

In case you’re wondering, when write(), fwrite() or any other library call that writes data to disk reports success you are not guaranteed that the data is actually on the disk. In fact, in Linux, write() reports success when data is in dirty cache. Then, special kernel thread kicks in and makes sure that the data is on disk.

Depending on circumstances, it may take some time until writer kernel thread will finish writing. Anyway, in his post Evan talks about how to make sure that the data is actually stable on disk.

Did you know that you can receive periodical updates with the latest articles that I write right into your email box? Alternatively, you subscribe to the RSS feed!

Want to know how? Check out
Subscribe page

2 Comments

  1. Raine says:

    Also this article is very interesting for detailed examples regarding syncing to disks:
    http://lwn.net/Articles/457667/

  2. Hydroleader, bureau d’études marocain installé à Marrakech et Rabat spécialisé en hydraulique

    Bureau d’études hydraulique Maroc

Leave a Reply

Prove you are not a computer or die *