diff options
author | David Teigland <teigland@redhat.com> | 2013-06-25 13:48:01 -0400 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2013-06-25 13:53:20 -0400 |
commit | 696b3d84605e5546cbddefdc95b9099f908fd56e (patch) | |
tree | 51a4e2751455e456574cd4cbb1db28fa44905d20 /fs/dlm | |
parent | ad917e7f821855a2f223131bb6c90ca6c9240bf3 (diff) |
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>
Diffstat (limited to 'fs/dlm')
-rw-r--r-- | fs/dlm/lockspace.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c index 3ca79d3253b9..88556dc0458e 100644 --- a/fs/dlm/lockspace.c +++ b/fs/dlm/lockspace.c | |||
@@ -883,17 +883,24 @@ int dlm_release_lockspace(void *lockspace, int force) | |||
883 | void dlm_stop_lockspaces(void) | 883 | void dlm_stop_lockspaces(void) |
884 | { | 884 | { |
885 | struct dlm_ls *ls; | 885 | struct dlm_ls *ls; |
886 | int count; | ||
886 | 887 | ||
887 | restart: | 888 | restart: |
889 | count = 0; | ||
888 | spin_lock(&lslist_lock); | 890 | spin_lock(&lslist_lock); |
889 | list_for_each_entry(ls, &lslist, ls_list) { | 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 | continue; | 894 | continue; |
895 | } | ||
892 | spin_unlock(&lslist_lock); | 896 | spin_unlock(&lslist_lock); |
893 | log_error(ls, "no userland control daemon, stopping lockspace"); | 897 | log_error(ls, "no userland control daemon, stopping lockspace"); |
894 | dlm_ls_stop(ls); | 898 | dlm_ls_stop(ls); |
895 | goto restart; | 899 | goto restart; |
896 | } | 900 | } |
897 | spin_unlock(&lslist_lock); | 901 | spin_unlock(&lslist_lock); |
902 | |||
903 | if (count) | ||
904 | log_print("dlm user daemon left %d lockspaces", count); | ||
898 | } | 905 | } |
899 | 906 | ||