Skip to content

Commit

Permalink
fix(linstorvhdutil): coalesce helper returns the sector count now
Browse files Browse the repository at this point in the history
Without this change we have an error in cleanup.py that interrupts
the coalesce algorithm.

Signed-off-by: Ronan Abhamon <[email protected]>
  • Loading branch information
Wescoeur committed Dec 11, 2024
1 parent 122b4a1 commit 65021ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions drivers/linstor-manager
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,7 @@ def set_parent(session, args):
def coalesce(session, args):
try:
device_path = args['devicePath']
vhdutil.coalesce(device_path)
return ''
return str(vhdutil.coalesce(device_path))
except Exception as e:
util.SMlog('linstor-manager:coalesce error: {}'.format(e))
raise
Expand Down
2 changes: 1 addition & 1 deletion drivers/linstorvhdutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def force_parent(self, path, parentPath, parentRaw=False):

@linstormodifier()
def force_coalesce(self, path):
return self._call_method(vhdutil.coalesce, 'coalesce', path, use_parent=True)
return int(self._call_method(vhdutil.coalesce, 'coalesce', path, use_parent=True))

@linstormodifier()
def force_repair(self, path):
Expand Down

0 comments on commit 65021ac

Please sign in to comment.