diff options
author | Alexander Aring <aahringo@redhat.com> | 2022-06-22 14:45:14 -0400 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2022-06-24 11:57:46 -0500 |
commit | 7e09b15cfe7b6a6135448015482112869722a763 (patch) | |
tree | 07b63bc1d70b7b553efff90b526cc67870cd0688 /fs | |
parent | ca8031d917691e5c4f101c9ec39fc41b105b7e14 (diff) | |
download | linux-stable-7e09b15cfe7b6a6135448015482112869722a763.tar.gz linux-stable-7e09b15cfe7b6a6135448015482112869722a763.tar.bz2 linux-stable-7e09b15cfe7b6a6135448015482112869722a763.zip |
fs: dlm: call dlm_lsop_recover_prep once
A lockspace can be "stopped" multiple times consecutively before
being "started" (when recoveries overlap.) In this case, the
lsop_recover_prep callback only needs to be called once when the
lockspace is first stopped, and not repeatedly for each stop.
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/dlm/member.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/dlm/member.c b/fs/dlm/member.c index 7e5f5aefefb5..67b056634f03 100644 --- a/fs/dlm/member.c +++ b/fs/dlm/member.c @@ -679,7 +679,16 @@ int dlm_ls_stop(struct dlm_ls *ls) if (!ls->ls_recover_begin) ls->ls_recover_begin = jiffies; - dlm_lsop_recover_prep(ls); + /* call recover_prep ops only once and not multiple times + * for each possible dlm_ls_stop() when recovery is already + * stopped. + * + * If we successful was able to clear LSFL_RUNNING bit and + * it was set we know it is the first dlm_ls_stop() call. + */ + if (new) + dlm_lsop_recover_prep(ls); + return 0; } |