Re: O_DIRECT, O_SYNC, or fsync() on NFS mounts?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is my understanding as well, at least from reading the man pages.
O_DIRECT and O_SYNC have different characteristics, so I'm a bit
surprised at the responses here.

Furthermore, using O_DIRECT over a 1Gbe connection yields 100-110MB/s
performance where as O_SYNC on the same connection gives me around
20-30MB/s at best. There is definitely a difference.

-Moazam


On Sun, Nov 21, 2010 at 2:46 AM, Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
> On Fri, Nov 19, 2010 at 04:26:35PM -0500, Trond Myklebust wrote:
>> If the application requests O_DIRECT/O_SYNC or calls fsync(), we are
>> required by POSIX to ensure the data is safe on disk. The presence of an
>> NFS delegation does not change that requirement.
>
> That's not quite correct.  O_DIRECT for one is not actually specific in
> Posix at all, and the documented Linux semantics only say that the
> pagecache should not be used (even if it sometimes is with various
> filesystems).  There is not guarantee that data actually is on disk or
> reachable, for that you need to add the O_SYNC/O_DYSNC flag in addition
> or use fsync/fdatasync.
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux