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

7291 Attempting to destroy ZFS filesystem and create ZFS volume with … #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

deiter
Copy link
Contributor

@deiter deiter commented Apr 16, 2017

Please see https://www.illumos.org/issues/7291 for details.

  1. In case of ZFS filesystem with nested child datasets we have /dev/zvol/{r,}dsk directories hierarchy: /dev/zvol/{r,}dsk/pool/filesystem/child1/child2/child3
  2. When pool/filesystem/child1 filesystem and its child datasets are destroyed, all /dev/zvol/{r,}dsk directories hierarchy for pool/filesystem/child1 and sdev cache still exists (by design of usr/src/uts/common/fs/dev)
  3. After re-creation of pool/filesystem/child1 with another dataset type (volume instead of filesystem) and accessing this new ZFS volume (devzvol_lookup -> devname_lookup_func)
    sdev_cache_update(ddv, &dv, nm, SDEV_CACHE_DELETE) call updates the in-core directory cache ONLY.
  4. Therefore all /dev/zvol/{r,}dsk/pool/filesystem/child1 directories hierarchy still exists.
    So we have dv->sdev_nlink == number_of_child_datasets + 2 for /dev/zvol/{r,}dsk/pool/filesystem/child1 and system panic on VERIFY:

http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/fs/dev/sdev_subr.c#3133

Proposed patch: sdev_cleandir for stalled directory path.

Reviewed by: Sanjay Nadkarni [email protected]
Reviewed by: Saso Kiselkov [email protected]
Reviewed by: Roman Strashkin [email protected]
Reviewed by: Alek Pinchuk [email protected]

Patch was successfully tested and using internally at Nexenta and already included into the release NexentaStor 5.0.

Thank you!

…the same name caused system panic

Reviewed by: Sanjay Nadkarni <[email protected]>
Reviewed by: Saso Kiselkov <[email protected]>
Reviewed by: Roman Strashkin <[email protected]>
Reviewed by: Alek Pinchuk <[email protected]>
@ahrens
Copy link
Member

ahrens commented Mar 5, 2018

@deiter You'll have more luck getting this reviewed and integrated over at the OpenZFS github project -- I don't think that the illumos PR's are monitored. I took a quick look and it's great that you're adding a new test for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants