Print this page
12764 Holes prevent TRIM

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/zpool/zpool_main.c
          +++ new/usr/src/cmd/zpool/zpool_main.c
↓ open down ↓ 409 lines elided ↑ open up ↑
 410  410          uint_t children = 0;
 411  411          nvlist_t **child;
 412  412          uint_t i;
 413  413  
 414  414          (void) nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN,
 415  415              &child, &children);
 416  416  
 417  417          if (children == 0) {
 418  418                  char *path = zpool_vdev_name(g_zfs, zhp, nvroot, 0);
 419  419  
 420      -                if (strcmp(path, VDEV_TYPE_INDIRECT) != 0)
      420 +                if (strcmp(path, VDEV_TYPE_INDIRECT) != 0 &&
      421 +                    strcmp(path, VDEV_TYPE_HOLE) != 0)
 421  422                          fnvlist_add_boolean(res, path);
 422  423  
 423  424                  free(path);
 424  425                  return;
 425  426          }
 426  427  
 427  428          for (i = 0; i < children; i++) {
 428  429                  zpool_collect_leaves(zhp, child[i], res);
 429  430          }
 430  431  }
↓ open down ↓ 8056 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX