UBIFS robustness questions
adrian.hunter at nokia.com
Sun Jul 26 02:29:21 EDT 2009
Jamie Lokier wrote:
> 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...
Are you sure about that. I can do this:
/ # mkdir test2
/ # cd test2
/test2 # cp /bin/bash .
/test2 # ls -al
drwxr-xr-x 2 root root 224 Jan 3 22:20 .
drwxrwxrwx 25 root root 1768 Jan 3 22:20 ..
-rwxr-xr-x 1 root root 612764 Jan 3 22:20 bash
/test2 # ./bash -c "sleep 30;echo Done" &
/test2 # rm bash
/test2 # cd ..
/ # rmdir test2
/ # ps | grep bash
1261 root 2500 S ./bash -c sleep 30;echo Done
/ # Done
 + Done ./bash -c "sleep 30;echo Done"
More information about the linux-mtd