Skip to content
Commit b11eeea3 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov
Browse files

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: default avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
parent 09d17960
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment