Thanks all,

On Sun, Mar 30, 2014 at 9:59 PM, <[email protected]> wrote:

> On Sat, 29 Mar 2014 18:17:52 +0530, Sankar P said:
>
> > However, there is no guarantee that the data will be actually written
> > to disk. I have heard instances where a caching layer in the disk
> > tells the filesystem that the data is written but the data was not
> > written and there was a power failure and an ensuing loss of data.
>
> Actually, let me go a step further - I know of no current disks which
> support write caching that *don't* lie to the OS and say "I/O complete,
> data is on the disk" when it lands in the cache (leaving you vulnerable
> if there's a power hit before it flushes the cashe).
>
> Even more evil - although you'd *think* that the solution is to just
> disable
> the write cache so the disk can't lie and has to wait for the data to hit
> the platters, that's not quite true.  There's been disks (especially on the
> very low end where they Just Don't Care, and on the high end were numbers
> are everything) that will *say* they disabled the write cache, but it's
> still
> doing it inside....
>


Though I can't be still sure of that the data has been flushed to disk

something like wait_on_buffer() will help me a bit

I am still curious to know what happens in journalling, as the journal
NEEDS to be committed to the disk, before data writes/modifcation proceed.

Same for Direct IO as Vineet Suggested

I could not look at the code, will look the code.

-- 
Regards,
Rishi Agrawal
_______________________________________________
Kernelnewbies mailing list
[email protected]
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to