marsadm: prevent mutual overwrite of delete symlinks

Add an (unused) host context. Previously, concurrent
log-delete operations triggered by cron could lead to
unnecessary loss of deletetion symlinks.
This commit is contained in:
Thomas Schoebel-Theuer 2014-01-14 15:52:40 +01:00
parent c379a5e88f
commit 216ecbffde
2 changed files with 2 additions and 1 deletions

View File

@ -3918,6 +3918,7 @@ static const struct light_class light_classes[] = {
.cl_len = 7,
.cl_type = 'l',
.cl_serial = true,
.cl_hostcontext = false, // ignore context, although present
.cl_father = CL_GLOBAL_TODO,
.cl_prepare = prepare_delete,
},

View File

@ -1091,7 +1091,7 @@ sub _create_delete {
}
}
}
my $new = sprintf("$mars/todo-global/delete-%09d", ++$delete_nr);
my $new = sprintf("$mars/todo-global/delete-%09d-$host", ++$delete_nr);
lprint "create symlink $new -> $target\n";
set_link($target, $new);
}