Illumos #1346: zfs incremental receive may leave behind temporary clones
authorMartin Matuska <mm@FreeBSD.org>
Sun, 8 Apr 2012 17:16:46 +0000 (13:16 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 11 Apr 2012 19:02:27 +0000 (12:02 -0700)
1356 zfs dataset prefetch code not working
Reviewed by: Matthew Ahrens <matt@delphix.com>
Reviewed by: Dan McDonald <danmcd@nexenta.com>
Approved by: Gordon Ross <gwr@nexenta.com>

References to Illumos issue:
  https://www.illumos.org/issues/1346
  https://www.illumos.org/issues/1356

Ported-by: Richard Yao <ryao@cs.stonybrook.edu>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #647

module/zfs/zfs_ioctl.c

index 90ebb57..17dc35d 100644 (file)
@@ -1923,8 +1923,10 @@ top:
                uint64_t cookie = 0;
                int len = sizeof (zc->zc_name) - (p - zc->zc_name);
 
-               while (dmu_dir_list_next(os, len, p, NULL, &cookie) == 0)
-                       (void) dmu_objset_prefetch(p, NULL);
+               while (dmu_dir_list_next(os, len, p, NULL, &cookie) == 0) {
+                       if (!dataset_name_hidden(zc->zc_name))
+                               (void) dmu_objset_prefetch(zc->zc_name, NULL);
+               }
        }
 
        do {