Skip to content

Commit

Permalink
CA-331454: Remove leaf coalesce journal immediately before deleting p…
Browse files Browse the repository at this point in the history
…arent otherwise it's inconsistent

Signed-off-by: Mark Syms <mark.syms@citrix.com>
  • Loading branch information
MarkSymsCtx committed Mar 20, 2020
1 parent 42a6a64 commit 86c24cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2112,12 +2112,14 @@ def _doCoalesceLeaf(self, vdi):
util.fistpoint.activate("LVHDRT_coaleaf_before_delete", self.uuid)
self.deleteVDI(vdi)
util.fistpoint.activate("LVHDRT_coaleaf_after_delete", self.uuid)

util.fistpoint.activate("LVHDRT_coaleaf_before_remove_j", self.uuid)
self.journaler.remove(VDI.JRN_LEAF, vdiUuid)

self.forgetVDI(origParentUuid)
self._finishCoalesceLeaf(parent)
self._updateSlavesOnResize(parent)

util.fistpoint.activate("LVHDRT_coaleaf_before_remove_j", self.uuid)
self.journaler.remove(VDI.JRN_LEAF, vdiUuid)

def _calcExtraSpaceNeeded(self, child, parent):
assert(not parent.raw) # raw parents not supported
Expand Down

0 comments on commit 86c24cc

Please sign in to comment.