Re: Should raw I/O be added to the kernel?

Theodore Y. Ts'o (tytso@MIT.EDU)
Mon, 21 Dec 1998 16:58:42 -0500


From: Ronald Cole <ronald@forte-intl.com>
Date: Sun, 20 Dec 1998 22:56:48 -0800 (PST)

From my days at Unify a decade ago, you had to use raw disk IO because
fsync() wasn't guaranteed to have flushed the cache completely to the
disk before it returned. Of course, I'll be the first to admit that I
haven't checked out the kernel source to see if this is true for
Linux. But, I'm sure that someone will so that the database part of
this thread can be put to rest.

As far as I know, POSIX has always required that fsync() return when the
cache was flushed to disk, and I didn't think there were any fsync()
implementations that didn't follow this rule.

There were OS's that didn't have fsync(), however, and historically
sync() was never guaranteed to have completed its work before
returning. Perhaps that's what you were thinking of?

- Ted

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/