Along the same line, if I mount the file system synchronously (forget about
performance for now), will any write gets gaurenteed to get flushed into the
disk ? More specifically, if I do
step 1: mount fs synchronously
step 2: execute a program that does a fwrite() and ends.
step 3: purposely power off the system.
step 4: reboot.
Could I see my file there after step 4 ? Thank you for the help.
----- Original Message -----
From: "Steve Lord" <lord@xxxxxxx>
To: "Greg Freemyer" <freemyer@xxxxxxxxxxxxxxxxx>
Cc: "xfs mailing list" <linux-xfs@xxxxxxxxxxx>
Sent: Tuesday, October 15, 2002 2:45 PM
Subject: Re: Gaurenteed file write??
| On Tue, 2002-10-15 at 13:03, Greg Freemyer wrote:
| > All,
| > I have an iteration counter that I update every night.
| > echo $ITERATION > /backup/iteration
| > Recently this file was reset to 0.
| > I suspect it was a case of the "zero filled file".
| > For this specific file and shell script, what extra logic can I add that
would give me the highest likelihood of a successful disk write.
| > i.e. Would sync; sync; increase my odds of always successfully writing
this file out?
| > TIA
| > Greg Freemyer
| Write a little program which opens a file and calls fsync on it. sync
| should do it too.
| Steve Lord voice: +1-651-683-3511
| Principal Engineer, Filesystem Software email: lord@xxxxxxx