Skip to content

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!

@Toasterson
Copy link

Please check illumos guidelines for Submitting changes to get this integrated. https://illumos.org/docs/contributing/gerrit/ Also please do not take actions on not monitored Pull Request, we unfortuantely cannot close/disable them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants