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

spa_export_common: refactor common exit points #11514

Conversation

wca
Copy link
Contributor

@wca wca commented Jan 25, 2021

This fixes a bug in which spa_is_exporting wasn't cleared in some cases.

Signed-off-by: Will Andrews will@firepipe.net

Motivation and Context

It's a bug fix.

Description

Create a common exit point for spa_export_common (a very long function), which avoids missing steps on failure.

How Has This Been Tested?

ZTS

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)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

This fixes a bug in which spa_is_exporting wasn't cleared in some cases.

Signed-off-by:	Will Andrews <will@firepipe.net>
@wca wca mentioned this pull request Jan 25, 2021
12 tasks
@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Jan 25, 2021
Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

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

I'm fine with the refactoring since I know we're going to need to for subsequent changes. But I think the description is a little misleading since it does look like in both cases here we are correctly clearing spa_is_exporting. If you like I can update the comment accordingly when merging.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Jan 25, 2021
@behlendorf behlendorf merged commit f4f50a7 into openzfs:master Jan 25, 2021
jsai20 pushed a commit to jsai20/zfs that referenced this pull request Mar 30, 2021
Create a common exit point for spa_export_common (a very long 
function), which avoids missing steps on failure.  This work
is helpful for the planned forced pool export changes.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by:	Will Andrews <will@firepipe.net>
Closes openzfs#11514
sempervictus pushed a commit to sempervictus/zfs that referenced this pull request May 31, 2021
Create a common exit point for spa_export_common (a very long 
function), which avoids missing steps on failure.  This work
is helpful for the planned forced pool export changes.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by:	Will Andrews <will@firepipe.net>
Closes openzfs#11514
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.

2 participants