Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+8 -1
+8 -1
fs/dlm/lockspace.c
··· 883 883 void dlm_stop_lockspaces(void) 884 884 { 885 885 struct dlm_ls *ls; 886 + int count; 886 887 887 888 restart: 889 + count = 0; 888 890 spin_lock(&lslist_lock); 889 891 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++; 891 894 continue; 895 + } 892 896 spin_unlock(&lslist_lock); 893 897 log_error(ls, "no userland control daemon, stopping lockspace"); 894 898 dlm_ls_stop(ls); 895 899 goto restart; 896 900 } 897 901 spin_unlock(&lslist_lock); 902 + 903 + if (count) 904 + log_print("dlm user daemon left %d lockspaces", count); 898 905 } 899 906