Skip to content

Commit 696b3d8

Browse files
committed
dlm: log an error for unmanaged lockspaces
Log an error message if the dlm user daemon exits before all the lockspaces have been removed. Signed-off-by: David Teigland <teigland@redhat.com>
1 parent ad917e7 commit 696b3d8

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

fs/dlm/lockspace.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,17 +883,24 @@ int dlm_release_lockspace(void *lockspace, int force)
883883
void dlm_stop_lockspaces(void)
884884
{
885885
struct dlm_ls *ls;
886+
int count;
886887

887888
restart:
889+
count = 0;
888890
spin_lock(&lslist_lock);
889891
list_for_each_entry(ls, &lslist, ls_list) {
890-
if (!test_bit(LSFL_RUNNING, &ls->ls_flags))
892+
if (!test_bit(LSFL_RUNNING, &ls->ls_flags)) {
893+
count++;
891894
continue;
895+
}
892896
spin_unlock(&lslist_lock);
893897
log_error(ls, "no userland control daemon, stopping lockspace");
894898
dlm_ls_stop(ls);
895899
goto restart;
896900
}
897901
spin_unlock(&lslist_lock);
902+
903+
if (count)
904+
log_print("dlm user daemon left %d lockspaces", count);
898905
}
899906

0 commit comments

Comments
 (0)