> @@ -2058,6 +2058,24 @@ zfs_ioc_objset_stats_impl(zfs_cmd_t *zc, objset_t *os)
>                       error = zvol_get_stats(os, nv);
>                       if (error == EIO)
>                               return (error);
> +                     /*
> +                      * If the zvol's parent dataset was being destroyed
> +                      * when we called zvol_get_stats, then it's possible
> +                      * that the ZAP still existed but its blocks had
> +                      * been already been freed when we tried to read it.
> +                      * It would then appear that the ZAP had no entries.
> +                      */
> +                     if (error == ENOENT)
> +                             return (error);
> +                     /*
> +                      * a zvol's znode gets created before its zap gets
> +                      * created.  So there is a short window of time in which
> +                      * zvol_get_stats() can return EEXIST.  Return an
> +                      * error in that case

That must be it.  My original commit is older than that revision.  I'll close 
the pull request then.  I'll try reverting my changes in SpectraBSD and see if 
the problem reproduces over the next few weeks.

---
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/60/files#r50554517
_______________________________________________
developer mailing list
[email protected]
http://lists.open-zfs.org/mailman/listinfo/developer

Reply via email to