Transaction ordering

Bruce Guenter lists-ext3-users at bruce-guenter.dyndns.org
Thu Apr 29 19:10:33 UTC 2004


Greetings.

If I issue the following sequence of pseudo-syscalls:

	fd = open(temp_file, O_WRONLY)
	write(fd)
	rename(temp_file, dest_file)
	fsync(fd)
	close(fd)
(where dest_file is in a different directory)

Does ext3 order the commit such that the file write effectively happens
in the journal before the rename?  That is, is there any chance that, if
a crash occurred, that the destination directory would contain a link to
an incompletely written file?

Thanks.
-- 
Bruce Guenter <bruceg at em.ca> http://em.ca/~bruceg/ http://untroubled.org/
OpenPGP key: 699980E8 / D0B7 C8DD 365D A395 29DA  2E2A E96F B2DC 6999 80E8
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/ext3-users/attachments/20040429/e4b0b608/attachment.sig>


More information about the Ext3-users mailing list