User: Password:
|
|
Subscribe / Log in / New account

New NFS to bring parallel storage to the masses

New NFS to bring parallel storage to the masses

Posted Jan 24, 2009 14:14 UTC (Sat) by xav (subscriber, #18536)
In reply to: New NFS to bring parallel storage to the masses by jwb
Parent article: New NFS to bring parallel storage to the masses

I don't think there has ever been a guarantee on write() to be atomic. What write() does is return the number of bytes it could store, that's all.


(Log in to post comments)

New NFS to bring parallel storage to the masses

Posted Jan 24, 2009 17:19 UTC (Sat) by jwb (guest, #15467) [Link]

"If set, then all write operations write the data at the end of the file, extending it, regardless of the current file position. This is the only reliable way to append to a file. In append mode, you are guaranteed that the data you write will always go to the current end of the file, regardless of other processes writing to the file. Conversely, if you simply set the file position to the end of file and write, then another process can extend the file after you set the file position but before you write, resulting in your data appearing someplace before the real end of file."

http://theory.uwinnipeg.ca/gnu/glibc/libc_144.html


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds