OK, I understand the issue of the unnecessary copies - although I doubt
that systems with 'raw devices' directly 'DMA to user space' when writing
to an SCSI disk.
However, I thought that databases are interested in guaranteed completion,
i.e. once write(2) returns, the system should guarantee that the data is
really on disk. This is necessary for the transactional properties. Without
such a guarantee, you can pretty much forget about transactional recoveries
after a crash. Wouldn't O_SYNC give you the same properties? As for real
implementations: Does anybody know whether the Adabas or Postgres Linux
ports do use O_SYNC?
Thanks,
Martin