On Mon, Jul 10, 2017 at 02:36:22PM +0300, Askar Safin wrote: > > Hi. Currently "commit" for ext3 documented so: > > .BI commit= nrsec > Sync all data and metadata every > .I nrsec > seconds. The default value is 5 seconds. Zero means default.
This is actually wrong for ext3. It happens to be true for data=ordered (which is the default), but if you use data=writeback, it won't sync all data. So what this should be reworded to say is "Initiate a jbd2 journal commit every nrsec seconds". After a journal commit, file system metadata operations issued before the commit will be persisted after a crash. In order to guarantee that data should be persisted after a crash, the application must use fsync(2)." > So, it seems from man that ext4 has same "commit" option and its default > value is 5 seconds (even if I don't specify "commit" at command line at all). > But it seems that this is wrong ( https://lwn.net/Articles/322823/ ). So, > please, fix the man. Well, the *primary* definition of the commit option is that we will start a jbd2 commit option every N seconds. This is the same for ext3 and ext4. So I would say that the description you referenced in the ext4 portion of the document is corret, and the part of the document that you referenced in the ext3 section was incorrect. The ext4 man page was actually copied from Documentation/filesystems/ext4.txt, and there are certainly some changes we could make to improve the man page. Thanks for pointing this out, - Ted