Results 1 to 1 of 1
If this is the wrong place for this question, please direct me to the appropriate forum. I have a question about what would be the best fit for my application. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-21-2007 #1
- Join Date
- Mar 2007
EXT2 vs. EXT3: mount w/sync or fdatasync
I have a question about what would be the best fit for my application. My application needs to always sync file data after writing. I don't want anything handing around in the kernel buffers. I am wondering what is the best method to use to accomplish this.
1. Do I use EXT2 and use fdatasync() or fsync()?
2. Do I use EXT2 and mount with the "sync" option?
3. Do I use EXT2 and use the O_DIRECT flag on open()?
4. Do I use EXT3 in full journaled mode, where the data and metadata are journaled? In this case, is the data written to the journal sync'd or is an async operation? When the journal commits the data to the file system, is that sync'd or dumped into kernel buffers?
5. Since I will always be syncing the data, does it make any sense to use EXT3? It feels like the EXT3 journal would be an unnecessary step.
Thanks in advance,