Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the "atomic disk write" for a Linux filesystem?

From the nginx config file readme:

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.

like image 631
lovespring Avatar asked Oct 31 '22 05:10

lovespring


1 Answers

This actually depends on the filesystem being used. This is probably referring to the stat.blksize filesystem attribute.

From the stat(2) manual page:

       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.

like image 99
Sam Varshavchik Avatar answered Nov 10 '22 18:11

Sam Varshavchik