Is this proper fsync'ing ?

Dax Kelson (dax@gurulabs.com)
12 Nov 2002 17:55:55 -0700


Here is some strace output from email delivery via maildrop compiled
with --with-dirsync:

open("./Maildir/tmp/1037107256.1332_0.mail,S=673", O_WRONLY|O_NONBLOCK|O_CREAT|O_EXCL, 0666) = 3
write(3, "message contents goes here"..., 673) = 673
fsync(3) = 0
close(3) = 0
link("./Maildir/tmp/1037107256.1332_0.mail,S=673", "./Maildir/new/1037107256.1332_0.mail,S=673") = 0
open("./Maildir/new", O_RDONLY) = 3
fsync(3) = 0
close(3) = 0
unlink("./Maildir/tmp/1037107256.1332_0.mail,S=673") = 0
[snip some non-relevant stuff]
exit(0)

Does this look correct/safe? Filesystem is ext3 data=writeback.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/