Skip to content

Commit

Permalink
CA-315152: gc_force needs to take gc_active lock not running
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Syms <mark.syms@citrix.com>
  • Loading branch information
MarkSymsCtx committed May 8, 2019
1 parent d84c81a commit 8339446
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2767,7 +2767,7 @@ def gc_force(session, srUuid, force = False, dryRun = False, lockSR = False):
Util.log("=== SR %s: gc_force ===" % srUuid)
init(srUuid)
sr = SR.getInstance(srUuid, session, lockSR, True)
if not lockRunning.acquireNoblock():
if not lockActive.acquireNoblock():
abort(srUuid)
else:
Util.log("Nothing was running, clear to proceed")
Expand All @@ -2783,7 +2783,7 @@ def gc_force(session, srUuid, force = False, dryRun = False, lockSR = False):
finally:
sr.cleanup()
sr.logFilter.logState()
lockRunning.release()
lockActive.release()

def get_state(srUuid):
"""Return whether GC/coalesce is currently running or not. The information
Expand Down

0 comments on commit 8339446

Please sign in to comment.