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

Remove zvol device node #946

Closed
wants to merge 1 commit into from
Closed

Conversation

behlendorf
Copy link
Contributor

The 'zfs destroy' changes in 330d06f disrupted how zvol devices
get removed on ZoL. However, it basically boils down to the
fact that we are no longer reliably calling zvol_remove_minor()
via zfs_ioc_destroy_snaps().

Therefore we add the missing call and handle things similarly
to the existing zfs_unmount_snap() case. Ideally we would check
if this is of type DMU_OST_ZFS or DMU_OST_ZVOL and just do the
right thing as in zfs_ioc_destroy(). However, it looks like
it would be fairly expensive to get the type, and it's harmless
to simply attempt the umount and minor removal.

It's not exactly clear to me why this wasn't an issue for the
upstream Illumos code.

Signed-off-by: Brian Behlendorf behlendorf1@llnl.gov
Issue #903

The 'zfs destroy' changes in 330d06f disrupted how zvol devices
get removed on ZoL.  However, it basically boils down to the
fact that we are no longer reliably calling zvol_remove_minor()
via zfs_ioc_destroy_snaps().

Therefore we add the missing call and handle things similarly
to the existing zfs_unmount_snap() case.  Ideally we would check
if this is of type DMU_OST_ZFS or DMU_OST_ZVOL and just do the
right thing as in zfs_ioc_destroy().  However, it looks like
it would be fairly expensive to get the type, and it's harmless
to simply attempt the umount and minor removal.

It's not exactly clear to me why this wasn't an issue for the
upstream Illumos code.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#903
@behlendorf
Copy link
Contributor Author

Merge as commit 4ca9a43 , we may want to revisit this to sync up with whatever Illumos decides to do. However, for now this solution works, is safe, and is far preferable to leaving this broken.

@behlendorf behlendorf closed this Sep 10, 2012
pcd1193182 pushed a commit to pcd1193182/zfs that referenced this pull request Sep 26, 2023
…object_agent/async-backtrace-0.2.6

Bump async-backtrace from 0.2.5 to 0.2.6 in /cmd/zfs_object_agent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant