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

FreeBSD: Fix zvol_cdev_open locking #13016

Merged
merged 1 commit into from
Jan 26, 2022

Conversation

ghost
Copy link

@ghost ghost commented Jan 25, 2022

Motivation and Context

First open locking changes were correctly applied to zvol_geom_open but
incorrectly applied to zvol_cdev_open, causing spa_namespace_lock to be
held indefinitely.

Description

Make the first open locking in zvol_cdev_open match zvol_geom_open.

How Has This Been Tested?

Tested on a FreeBSD system where the issue was observed.

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:

First open locking changes were correctly applied to zvol_geom_open but
incorrectly applied to zvol_cdev_open, causing spa_namespace_lock to be
held indefinitely.

Make the first open locking in zvol_cdev_open match zvol_geom_open.

Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
@ghost ghost requested a review from amotin January 25, 2022 16:55
@ghost ghost added the Status: Code Review Needed Ready for review and testing label Jan 25, 2022
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Jan 25, 2022
freebsd-git pushed a commit to freebsd/freebsd-src that referenced this pull request Jan 26, 2022
First open locking changes were correctly applied to zvol_geom_open but
incorrectly applied to zvol_cdev_open, causing spa_namespace_lock to be
held indefinitely.

Make the first open locking in zvol_cdev_open match zvol_geom_open.

This change has been accepted upstream in openzfs/zfs#13016 but is not
yet merged.

Reviewed by:	mav
Fixes:		e92ffd9
Sponsored by:	iXsystems, Inc.
@behlendorf behlendorf merged commit 3158c2e into openzfs:master Jan 26, 2022
@ghost ghost deleted the fix-zvol-cdev-open-locking branch January 26, 2022 20:09
ghost pushed a commit to truenas/zfs that referenced this pull request Feb 2, 2022
First open locking changes were correctly applied to zvol_geom_open but
incorrectly applied to zvol_cdev_open, causing spa_namespace_lock to be
held indefinitely.

Make the first open locking in zvol_cdev_open match zvol_geom_open.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes openzfs#13016
tonyhutter pushed a commit that referenced this pull request Feb 3, 2022
First open locking changes were correctly applied to zvol_geom_open but
incorrectly applied to zvol_cdev_open, causing spa_namespace_lock to be
held indefinitely.

Make the first open locking in zvol_cdev_open match zvol_geom_open.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #13016
bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this pull request Feb 5, 2022
First open locking changes were correctly applied to zvol_geom_open but
incorrectly applied to zvol_cdev_open, causing spa_namespace_lock to be
held indefinitely.

Make the first open locking in zvol_cdev_open match zvol_geom_open.

This change has been accepted upstream in openzfs/zfs#13016 but is not
yet merged.

Reviewed by:	mav
Fixes:		e92ffd9
Sponsored by:	iXsystems, Inc.
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
First open locking changes were correctly applied to zvol_geom_open but
incorrectly applied to zvol_cdev_open, causing spa_namespace_lock to be
held indefinitely.

Make the first open locking in zvol_cdev_open match zvol_geom_open.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes openzfs#13016
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
First open locking changes were correctly applied to zvol_geom_open but
incorrectly applied to zvol_cdev_open, causing spa_namespace_lock to be
held indefinitely.

Make the first open locking in zvol_cdev_open match zvol_geom_open.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes openzfs#13016
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