restore: auto-unlink for ghost files (v2)
A ghost file is used for restoring descriptors of an unlinked file. It is created, opened and deleted. Currently ghost files are collected in root task and then removed by crtools when everybody is restored. This scheme doesn't work, ghost_file_list is not shared, plus tasks may live in different mount namespace. It was broken by the following commit: bd4e5d2f restore: prepare shared objects after initializing namespaces We can't just move clear_ghost_files(), because we need to wait, until all processes have not opened a ghost file. We can add one more global barrier or move clear_ghost_files() in a restore code bellow an existent barrier. Here is a better sollution, a gost file is deleted by the last user. v2: Use the type atomic_t and fix a commit message. Signed-off-by:Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
Showing
Please
register
or
sign in
to comment