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

Need a long hold in zpl_mount_impl #10936

Merged
merged 1 commit into from
Sep 17, 2020

Conversation

jwpoduska
Copy link
Contributor

@jwpoduska jwpoduska commented Sep 16, 2020

Motivation and Context

Description

In zpl_mount_impl, there is:

    dmu_objset_hold	; returns with pool & ds held
    dsl_pool_rele

    sget

    dsl_dataset_rele

As spelled out in the "DSL Pool Configuration Lock" in dsl_pool.c, this requires a long hold.

How Has This Been Tested?

This issue was found through code inspection.

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:

In zpl_mount_impl, there is:
    dmu_objset_hold	; returns with pool & ds held
    dsl_pool_rele

    sget

    dsl_dataset_rele

As spelled out in the "DSL Pool Configuration Lock" in dsl_pool.c,
this requires a long hold.

Signed-off-by: John Poduska <[email protected]>
@jwpoduska
Copy link
Contributor Author

@behlendorf you might want to take a look at this...

@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Sep 16, 2020
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.

Good find! I'm curious did you git any problems because of this, or was it just something you found while reading the code?

@jwpoduska
Copy link
Contributor Author

No, I did not hit it. What happened was we tripped over the deadlock you fixed, Fix zpl_mount() deadlock and when I looked at the diff, I noticed it.

@PaulZ-98
Copy link
Contributor

Looks good.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Sep 17, 2020
@behlendorf behlendorf merged commit 5bed68b into openzfs:master Sep 17, 2020
behlendorf pushed a commit that referenced this pull request Sep 18, 2020
In zpl_mount_impl, there is:
    dmu_objset_hold	; returns with pool & ds held
    dsl_pool_rele

    sget

    dsl_dataset_rele

As spelled out in the "DSL Pool Configuration Lock" in dsl_pool.c,
this requires a long hold.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Paul Zuchowski <[email protected]>
Signed-off-by: John Poduska <[email protected]>
Closes #10936
jsai20 pushed a commit to jsai20/zfs that referenced this pull request Mar 30, 2021
In zpl_mount_impl, there is:
    dmu_objset_hold	; returns with pool & ds held
    dsl_pool_rele

    sget

    dsl_dataset_rele

As spelled out in the "DSL Pool Configuration Lock" in dsl_pool.c,
this requires a long hold.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Paul Zuchowski <[email protected]>
Signed-off-by: John Poduska <[email protected]>
Closes openzfs#10936
sempervictus pushed a commit to sempervictus/zfs that referenced this pull request May 31, 2021
In zpl_mount_impl, there is:
    dmu_objset_hold	; returns with pool & ds held
    dsl_pool_rele

    sget

    dsl_dataset_rele

As spelled out in the "DSL Pool Configuration Lock" in dsl_pool.c,
this requires a long hold.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Paul Zuchowski <[email protected]>
Signed-off-by: John Poduska <[email protected]>
Closes openzfs#10936
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