Skip to content

Conversation

rp-
Copy link
Contributor

@rp- rp- commented Oct 3, 2025

Description

Instead of always write zeroes to the drbd device, we enable now sparse/discard options for qemu-img convert,
if the Linstor device supports thin.
This reduces revert time and also makes the devices not thick allocated anymore.
Too ensure the devices only contains zeroes, we have to blkdiscard it before.

Fixes: #11765

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Tested local volume revert on a Linstor cluster.
This change should only affect Linstor primary storage, as no other code parts are touched.

How did you try to break this feature and the system with this change?

This reduces revert time and also
makes the devices not thick allocated anymore.
Copy link

codecov bot commented Oct 3, 2025

Codecov Report

❌ Patch coverage is 0% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 15.18%. Comparing base (2e113e5) to head (bc2c92c).
⚠️ Report is 1 commits behind head on 4.19.

Files with missing lines Patch % Lines
...cloudstack/storage/datastore/util/LinstorUtil.java 0.00% 21 Missing ⚠️
...per/LinstorRevertBackupSnapshotCommandWrapper.java 0.00% 9 Missing ⚠️
.../hypervisor/kvm/storage/LinstorStorageAdaptor.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               4.19   #11787   +/-   ##
=========================================
  Coverage     15.18%   15.18%           
- Complexity    11370    11371    +1     
=========================================
  Files          5415     5415           
  Lines        476082   476089    +7     
  Branches      58129    58130    +1     
=========================================
+ Hits          72288    72299   +11     
+ Misses       395702   395698    -4     
  Partials       8092     8092           
Flag Coverage Δ
uitests 4.28% <ø> (ø)
unittests 15.91% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rp- rp- requested a review from DaanHoogland October 3, 2025 12:04
Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

Copy link
Contributor

@harikrishna-patnala harikrishna-patnala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code LGTM

@DaanHoogland DaanHoogland merged commit a208db5 into apache:4.19 Oct 6, 2025
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants