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

OpenZFS 9690 - metaslab of vdev with no space maps was flushed during removal #8039

Closed
wants to merge 1 commit into from

Conversation

behlendorf
Copy link
Contributor

Motivation and Context

OpenZFS-issue: https://www.illumos.org/issues/9690
OpenZFS-commit: openzfs/openzfs@4e75ba6826

Description

This seems to point to that the space map's dnode has been freed probably through dnode_sync_free() as this is the function that actually frees the dnode and zeroes out all the above fields.

The failure occurs while we were trying to flush a metaslab in spa_sync() and these code paths have assertions everywhere that we only flush metaslabs that have a space map (e.g. went through metaslab_sync() at least once since the creation of the pool). There is a contradiction then where the metaslab's spacemap information in memory (ms_sm data) exist but the actual space map on-disk have been freed.

To fix this, we first want to try calling vdev_remove_empty() only for log devices in vdev_sync().

How Has This Been Tested?

Locally built, merged to illumos, pending CI results.

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:

… removal

Authored by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>

OpenZFS-issue: https://www.illumos.org/issues/9690
OpenZFS-commit: openzfs/openzfs@4e75ba6826
@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Oct 18, 2018
Copy link
Member

@gmelikov gmelikov left a comment

Choose a reason for hiding this comment

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

Lgtm

@codecov
Copy link

codecov bot commented Oct 19, 2018

Codecov Report

Merging #8039 into master will decrease coverage by 0.11%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8039      +/-   ##
==========================================
- Coverage   78.46%   78.35%   -0.12%     
==========================================
  Files         377      377              
  Lines      114404   114405       +1     
==========================================
- Hits        89768    89639     -129     
- Misses      24636    24766     +130
Flag Coverage Δ
#kernel 78.72% <100%> (-0.01%) ⬇️
#user 66.83% <14.28%> (-0.74%) ⬇️

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 9f438c5...87acdfd. Read the comment docs.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Oct 19, 2018
ghfields pushed a commit to ghfields/zfs that referenced this pull request Oct 29, 2018
… removal

Authored by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Reviewed by: George Melikov <mail@gmelikov.ru>
Approved by: Robert Mustacchi <rm@joyent.com>
Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>

OpenZFS-issue: https://www.illumos.org/issues/9690
OpenZFS-commit: openzfs/openzfs@4e75ba6826
Closes openzfs#8039
BrainSlayer pushed a commit to BrainSlayer/zfs that referenced this pull request Nov 4, 2018
… removal

Authored by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Reviewed by: George Melikov <mail@gmelikov.ru>
Approved by: Robert Mustacchi <rm@joyent.com>
Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>

OpenZFS-issue: https://www.illumos.org/issues/9690
OpenZFS-commit: openzfs/openzfs@4e75ba6826
Closes openzfs#8039
GregorKopka pushed a commit to GregorKopka/zfs that referenced this pull request Jan 7, 2019
… removal

Authored by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Reviewed by: George Melikov <mail@gmelikov.ru>
Approved by: Robert Mustacchi <rm@joyent.com>
Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>

OpenZFS-issue: https://www.illumos.org/issues/9690
OpenZFS-commit: openzfs/openzfs@4e75ba6826
Closes openzfs#8039
@behlendorf behlendorf deleted the openzfs-9690 branch April 19, 2021 18:19
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