Print this page
5269 zfs: zpool import slow
PORTING: this code relies on the property of taskq_wait to wait
until no more tasks are queued and no more tasks are active. As
we always queue new tasks from within other tasks, task_wait
reliably waits for the full recursion to finish, even though we
enqueue new tasks after taskq_wait has been called.
On platforms other than illumos, taskq_wait may not have this
property.
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: George Wilson <george.wilson@delphix.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/sys/dmu_objset.h
          +++ new/usr/src/uts/common/fs/zfs/sys/dmu_objset.h
↓ open down ↓ 134 lines elided ↑ open up ↑
 135  135  #define DMU_OS_IS_L2CACHEABLE(os)                               \
 136  136          ((os)->os_secondary_cache == ZFS_CACHE_ALL ||           \
 137  137          (os)->os_secondary_cache == ZFS_CACHE_METADATA)
 138  138  
 139  139  #define DMU_OS_IS_L2COMPRESSIBLE(os)    (zfs_mdcomp_disable == B_FALSE)
 140  140  
 141  141  /* called from zpl */
 142  142  int dmu_objset_hold(const char *name, void *tag, objset_t **osp);
 143  143  int dmu_objset_own(const char *name, dmu_objset_type_t type,
 144  144      boolean_t readonly, void *tag, objset_t **osp);
      145 +int dmu_objset_own_obj(struct dsl_pool *dp, uint64_t obj,
      146 +    dmu_objset_type_t type, boolean_t readonly, void *tag, objset_t **osp);
 145  147  void dmu_objset_refresh_ownership(objset_t *os, void *tag);
 146  148  void dmu_objset_rele(objset_t *os, void *tag);
 147  149  void dmu_objset_disown(objset_t *os, void *tag);
 148  150  int dmu_objset_from_ds(struct dsl_dataset *ds, objset_t **osp);
 149  151  
 150  152  void dmu_objset_stats(objset_t *os, nvlist_t *nv);
 151  153  void dmu_objset_fast_stat(objset_t *os, dmu_objset_stats_t *stat);
 152  154  void dmu_objset_space(objset_t *os, uint64_t *refdbytesp, uint64_t *availbytesp,
 153  155      uint64_t *usedobjsp, uint64_t *availobjsp);
 154  156  uint64_t dmu_objset_fsid_guid(objset_t *os);
↓ open down ↓ 32 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX