SMB 和 EXT3 对文件写入顺序提供哪些保证?
从我的(Linux-)应用程序中,我正在监视热文件夹中的特定文件集。例如,我正在等待这个集合:
- example-1.xml
- example-2.xml
- example-3.xml
hotfolder 通过 SMB 在网络上共享。现在,为了确保所有文件在移走之前都已写入,我将等待最后一个空文件:
- example.done
我的客户端将确保该文件将是最后写入的文件。
我的假设是:
- 文件将通过网络发送并按写入顺序存储在磁盘上。
- 一旦 example.done 文件可用,之前的所有文件都将完成。
这些假设正确吗?
搜索“文件系统保证”只会导致文件内排序或系统崩溃可靠性的解释:
文件中操作顺序的保证
Linux 是否保证close() 后文件内容是否刷新到磁盘?
NTFS 提供哪些可靠性保证?
From my (Linux-)application, I am watching a hotfolder for specific sets of files. For example, I am waiting for this set:
- example-1.xml
- example-2.xml
- example-3.xml
The hotfolder is shared over the network via SMB. Now, to be sure that all files are written before I move them away, I will wait for one last empty file:
- example.done
My client will ensure that this file will be the last file that is written.
My assumptions are:
- files will be sent over the network and stored on disk in the order they were written.
- once the example.done file is available, all previous files will be complete.
Are these assumptions correct?
Searching for "file system guarantees" only results in explanations of in-file ordering or reliability in system crashes:
Guarantees of order of the operations on file
Does Linux guarantee the contents of a file is flushed to disc after close()?
What reliability guarantees are provided by NTFS?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论