Does enabling data=journal for ext4 make any difference when using mmap() to update a file?
The ext4 man page says:
journal
All data is committed into the journal prior to being written into the main filesystem.
Which isn't really helpful in saying when the data is actually written to the file system.
I would imagine that for memory-mapped files, the writes that I perform between two msync() calls are not going to be atomic. Some writes might be durable before others and result in an inconsistent state.
Does this mean data=journal is only useful for the read/write interface and with mmap I should always use a write-ahead-log?