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

9185 metaslab_verify_weight_and_frag() shouldn't cause side-effects #9282

Merged
merged 1 commit into from
Sep 5, 2019

Conversation

sdimitro
Copy link
Contributor

@sdimitro sdimitro commented Sep 3, 2019

metaslab_verify_weight_and_frag() a verification function and
by the end of it there shouldn't be any side-effects.

The function calls metaslab_weight() which in turn calls
metaslab_set_fragmentation(). The latter can dirty and otherwise
not dirty metaslab fro the next TXGand set metaslab_condense_wanted
if the spacemaps were just upgraded (meaning we just enabled the
SPACEMAP_HISTOGRAM feature through upgrade).

This patch adds a new flag as a parameter to metaslab_weight() and
metaslab_set_fragmentation() making the dirtying of the metaslab
optional.

Signed-off-by: Serapheim Dimitropoulos serapheim@delphix.com

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:

`metaslab_verify_weight_and_frag()` a verification function and
by the end of it there shouldn't be any side-effects.

The function calls `metaslab_weight()` which in turn calls
`metaslab_set_fragmentation()`. The latter can dirty and otherwise
not dirty metaslab fro the next TXGand set `metaslab_condense_wanted`
if the spacemaps were just upgraded (meaning we just enabled the
SPACEMAP_HISTOGRAM feature through upgrade).

This patch adds a new flag as a parameter to `metaslab_weight()` and
`metaslab_set_fragmentation()` making the dirtying of the metaslab
optional.

Signed-off-by: Serapheim Dimitropoulos <serapheim@delphix.com>
@sdimitro sdimitro requested a review from ahrens September 3, 2019 22:24
@codecov
Copy link

codecov bot commented Sep 4, 2019

Codecov Report

Merging #9282 into master will decrease coverage by 11.79%.
The diff coverage is 75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9282      +/-   ##
==========================================
- Coverage      79%    67.2%   -11.8%     
==========================================
  Files         400      325      -75     
  Lines      122041   104687   -17354     
==========================================
- Hits        96416    70359   -26057     
- Misses      25625    34328    +8703
Flag Coverage Δ
#kernel ?
#user 67.2% <75%> (+0.77%) ⬆️

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 a6a2877...b02f7bd. Read the comment docs.

@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Sep 4, 2019
@sdimitro sdimitro requested a review from pcd1193182 September 4, 2019 17:12
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Sep 4, 2019
@behlendorf behlendorf merged commit 65a91b1 into openzfs:master Sep 5, 2019
allanjude pushed a commit to KlaraSystems/zfs that referenced this pull request Apr 28, 2020
`metaslab_verify_weight_and_frag()` a verification function and
by the end of it there shouldn't be any side-effects.

The function calls `metaslab_weight()` which in turn calls
`metaslab_set_fragmentation()`. The latter can dirty and otherwise
not dirty metaslab fro the next TXGand set `metaslab_condense_wanted`
if the spacemaps were just upgraded (meaning we just enabled the
SPACEMAP_HISTOGRAM feature through upgrade).

This patch adds a new flag as a parameter to `metaslab_weight()` and
`metaslab_set_fragmentation()` making the dirtying of the metaslab
optional.

Reviewed-by: Matt Ahrens <matt@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Serapheim Dimitropoulos <serapheim@delphix.com>
Closes openzfs#9185
Closes openzfs#9282
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.

3 participants