[Development] QFile: writing via a temporary file

Oswald Buddenhagen oswald.buddenhagen at nokia.com
Mon Jan 9 11:54:32 CET 2012


On Fri, Jan 06, 2012 at 07:04:56PM -0200, ext Thiago Macieira wrote:
> Moreover, filesystems on Linux (at least) are tuned so that, if the renaming is 
> recorded, the data was too. There was an issue with early ext4 that those were 
> not synchronised: the writing of the rename happened up to 30 seconds before 
> the writing of the file's data. That meant a crash in that rather large window 
> of time would leave the file empty upon reboot.
> 
don't be too optimistic here. xfs still didn't fix that issue according
to my latest knowledge. ext4 is the only one i know to be good. i think
btrfs inherited that safety, too. ext3 (in ordered data mode) and
reiser3 are safe, too. dunno about other file systems and operating
systems - posix doesn't requite being sane. that's why in kde we still
pay attention to $KDE_EXTRA_FSYNC (or whatever we called it) which
explicitly calls fdatasync() before closing the temp file.



More information about the Development mailing list