On Fri, Mar 19, 1999 at 02:57:41PM -0800, Chris Albertson wrote:
> .
> >
> > But, I will agree that applications have a general lack
> > of control under Linux to encourage/force certain blocks
> > of data to get written to disk quickly or synchronously.
>
> What about using the "O_SYNC" flag on an open system call?
> fsync() will do what you want also.
>
Yes... This is very true, and gets you a lot closer to
being confident that the data is written. However, there
is no guarantee that data is _physically_ written to the
media, only that the hard drive has recieved the data. [1]
O_SYNC is also really slow, since you have to wait for
the write to complete -- not good unless you _really_ want
it.
What I had in mind is the ability to specify the order
in which individual blocks are written -- again, this
order may be changed by the disk controller or even the
hard drive, so it's "soft" in the same way that O_SYNC
is "soft". And also do it in an asynchronous manner.
But I think the whole discussion is moot -- if you
want hard guarantees, use a UPS. If you want soft
guarantees, journaling and fsync() are good solutions,
although at a performance loss.
dave...
>
> --Chris Albertson
[1] many drives don't tell you when a block has
been written.
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/