简体   繁体   English

什么是Linux文件系统的“原子磁盘写入”?

[英]What's the “atomic disk write” for a Linux filesystem?

From the nginx config file readme: 从nginx配置文件自述文件:

access_log: 访问日志:

An optional third parameter indicates the size of the buffer 可选的第三个参数表示缓冲区的大小

If write buffering is used, this size cannot exceed the size of the atomic disk write for that filesystem. 如果使用写入缓冲,则此大小不能超过该文件系统的原子磁盘写入大小。

This actually depends on the filesystem being used. 这实际上取决于所使用的文件系统。 This is probably referring to the stat.blksize filesystem attribute. 这可能是指stat.blksize文件系统属性。

From the stat(2) manual page: stat(2)手册页:

       struct stat {

           /* ... */

           blksize_t st_blksize;     /* blocksize for filesystem I/O */

The -f option to the stat(1) appears to display this information, and on my Linux box, it shows 4096 as the block size. stat(1)的-f选项似乎显示此信息,在我的Linux框中,它显示4096作为块大小。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM