Magnus Hagander <[EMAIL PROTECTED]> wrote:

> FILE_FLAG_NO_BUFFERING requires that *all* I/O follows:
> * File access must begin at offsets that are integer multples of the
>   volume sector size.
> * File access must be for number of bytes that are integer multiples of
>   the volume sector size.
> * Buffer addresses for read and write operations must be sector aligned.
> 
> I was under the impression that our code can in no way guarantee this.
> Especially given that a typical NTFS drive can have anything from 512 to
> 4096 bytes if you use the GUI to format it, and larger sizes than that
> when you use some SAN tools to do it.

Do you mean there are drives that have larger sector size than 8kB?
We've already put the xlog buffer along the alignment of
ALIGNOF_XLOG_BUFFER (typically 8192 bytes).
But if there are such drives, using FILE_FLAG_NO_BUFFERING is harmful!


> (btw, we already map O_DSYNC to FILE_FLAG_WRITE_THROUGH)

Yes, it is not consistent to the source code...
And if we had the conclusion you said, the comment should be
"We are not willing to use FILE_FLAG_NO_BUFFERING".

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center



---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to