Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test cancelling a removal in ZTS #9101

Merged
merged 1 commit into from
Aug 5, 2019
Merged

Conversation

sdimitro
Copy link
Contributor

This patch adds a new test that sanity checks cancelling a removal.

Signed-off-by: Serapheim Dimitropoulos [email protected]

Description

A variation of this test has existed in DelphixOS for a while. It has helped detect bugs where there are faults in operations like forgetting to walk the ms_freeing or the ms_unflushed_frees trees from svr_allocd_segs when cancelling a removal. The variation that we had in DelphixOS was that instead of having zfs_removal_suspend_progress that just suspends removals right away (without potentially having done any copy whatsoever and thus having svr_allocd_segs empty to begin with) we had zfs_remove_max_bytes_pause which would pause removals AFTER having copied some data away from the removed device. zfs_removal_suspend_progress (ZoL) and zfs_remove_max_bytes_pause (DelphixOS) are in the same exact places in the source which makes me think that when upstreaming device removal to ZoL, people preferred the former over the latter. In any case, in order to "emulate"(/hack our way) zfs_remove_max_bytes_pause, we try to do enough writes in the device to be removed, so once the removal is issued we sleep for 1 second and then raise zfs_removal_suspend_progress to stop the removal mid-way.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist:

This patch adds a new test that sanity checks cancelling a removal.

Signed-off-by: Serapheim Dimitropoulos <[email protected]>
@ahrens ahrens added the Status: Code Review Needed Ready for review and testing label Jul 30, 2019
@ahrens ahrens requested a review from jwk404 July 30, 2019 16:09
@codecov
Copy link

codecov bot commented Jul 31, 2019

Codecov Report

Merging #9101 into master will decrease coverage by 0.29%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #9101     +/-   ##
=========================================
- Coverage   79.32%   79.03%   -0.3%     
=========================================
  Files         400      400             
  Lines      121640   121640             
=========================================
- Hits        96493    96139    -354     
- Misses      25147    25501    +354
Flag Coverage Δ
#kernel 79.66% <ø> (-0.14%) ⬇️
#user 66.9% <ø> (-0.64%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1e620c9...f27b3eb. Read the comment docs.

@sdimitro sdimitro added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Jul 31, 2019
@ahrens ahrens merged commit 8098465 into openzfs:master Aug 5, 2019
allanjude pushed a commit to allanjude/zfs that referenced this pull request Aug 12, 2019
This patch adds a new test that sanity checks cancelling a removal.

Reviewed-by: Matt Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: John Kennedy <[email protected]>
Signed-off-by: Serapheim Dimitropoulos <[email protected]>
Closes openzfs#9101
allanjude pushed a commit to allanjude/zfs that referenced this pull request Oct 13, 2019
This patch adds a new test that sanity checks cancelling a removal.

Reviewed-by: Matt Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: John Kennedy <[email protected]>
Signed-off-by: Serapheim Dimitropoulos <[email protected]>
Closes openzfs#9101
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Dec 24, 2019
This patch adds a new test that sanity checks cancelling a removal.

Reviewed-by: Matt Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: John Kennedy <[email protected]>
Signed-off-by: Serapheim Dimitropoulos <[email protected]>
Closes openzfs#9101
Conflicts:
	tests/zfs-tests/tests/functional/removal/Makefile.am
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Dec 27, 2019
This patch adds a new test that sanity checks cancelling a removal.

Reviewed-by: Matt Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: John Kennedy <[email protected]>
Signed-off-by: Serapheim Dimitropoulos <[email protected]>
Closes openzfs#9101
Conflicts:
	tests/zfs-tests/tests/functional/removal/Makefile.am
tonyhutter pushed a commit that referenced this pull request Jan 23, 2020
This patch adds a new test that sanity checks cancelling a removal.

Reviewed-by: Matt Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: John Kennedy <[email protected]>
Signed-off-by: Serapheim Dimitropoulos <[email protected]>
Closes #9101
Conflicts:
	tests/zfs-tests/tests/functional/removal/Makefile.am
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants