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

H. Peter Anvin (hpa@transmeta.com)
22 Jan 1999 02:19:17 GMT


Followup to: <199901211735.RAA04836@dax.scot.redhat.com>
By author: "Stephen C. Tweedie" <sct@redhat.com>
In newsgroup: linux.dev.kernel
>
> Yes you can. The way these applications work is to write all of the
> data for a commit, and to wait for it to complete before finally writing
> a commit record. That way, provided the OS does not acknowledge the
> write before it actually reaches the disk, the application can guarantee
> enough about the write ordering to be sure about data consistency. Raw
> IO, O_SYNC and fsync() provide enough support for the application to get
> this right, but fsync() does not provide guaranteed IO error
> notification so is not sufficient in the presence of errors.
>

Actually, it is better than that: as long as the commit record cannot
pass the data records, you can roll back to a consistent state.

-hpa

-- 
    PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD  1E DF FE 69 EE 35 BD 74
    See http://www.zytor.com/~hpa/ for web page and full PGP public key
        I am Bahá'í -- ask me about it or see http://www.bahai.org/
   "To love another person is to see the face of God." -- Les Misérables

- 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/