UBIFS robustness questions

Jamie Lokier jamie at shareable.org
Fri Jul 24 19:39:36 EDT 2009

Adrian Hunter wrote:
> Sorry to drag this out but it seems like it can be done with symlinks

That's right.  It should be powerfail safe.
Don't forget to "rm -fr version1" at the end :-)

However, if you are looking to use this for atomic update of a
directory while there are programs still running which use the
directory, it won't work.

You can't delete the old directory, because programs might still be
inside it...

It's not even always safe to kill and restart the programs after
renaming the symlink, because they might read some files from the new
directory before they've finished reading other files from the old

Regarding powerfail safety, it means you might have to defer deleting
the old directory until some major system action, like the next reboot.

-- Jamie

More information about the linux-mtd mailing list