Hi all,

I have been recently caught by an interesting issue, illustrated by the following use case:

"foo" is a cramfs filesystem file which might help illustrate the issue

1) loopback mount "foo" to mount /bar
2) umount /bar
3) append new files and re-generate the "foo" cramfs image
4) loopback mount "foo" to mount /bar
5) the contents of /bar are the same as in 1) and not 3)

the reason for this is because busybox has not deleted the "foo" <-> loopback device mapping, so when we attempt to mount again "foo", the mapping is already there, so the loopback device is not deleted then re-created.

Obviously using umount -d in 2) fixes the issue, but I was wondering whether it would not be preferable to unconditionnaly delete the loopback device upon umount? util-linux does this actually, so other users might also be puzzled by such a case.

Thank you very much for your answer.
--
Florian
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to