Print this page
5269 zfs: zpool import slow
While importing a pool all objsets are enumerated twice, once to check
the zil log chains and once to claim them. On pools with many datasets
this process might take a substantial amount of time.
Speed up the process by parallelizing it utilizing a taskq. The number
of parallel tasks is limited to 4 times the number of leaf vdevs.

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/sys/dmu.h
          +++ new/usr/src/uts/common/fs/zfs/sys/dmu.h
↓ open down ↓ 258 lines elided ↑ open up ↑
 259  259   */
 260  260  #define DMU_BONUS_BLKID         (-1ULL)
 261  261  #define DMU_SPILL_BLKID         (-2ULL)
 262  262  /*
 263  263   * Public routines to create, destroy, open, and close objsets.
 264  264   */
 265  265  int dmu_objset_hold(const char *name, void *tag, objset_t **osp);
 266  266  int dmu_objset_own(const char *name, dmu_objset_type_t type,
 267  267      boolean_t readonly, void *tag, objset_t **osp);
 268  268  void dmu_objset_rele(objset_t *os, void *tag);
      269 +void dmu_objset_rele_obj(objset_t *os, void *tag);
 269  270  void dmu_objset_disown(objset_t *os, void *tag);
 270  271  int dmu_objset_open_ds(struct dsl_dataset *ds, objset_t **osp);
 271  272  
 272  273  void dmu_objset_evict_dbufs(objset_t *os);
 273  274  int dmu_objset_create(const char *name, dmu_objset_type_t type, uint64_t flags,
 274  275      void (*func)(objset_t *os, void *arg, cred_t *cr, dmu_tx_t *tx), void *arg);
 275  276  int dmu_objset_clone(const char *name, const char *origin);
 276  277  int dsl_destroy_snapshots_nvl(struct nvlist *snaps, boolean_t defer,
 277  278      struct nvlist *errlist);
 278  279  int dmu_objset_snapshot_one(const char *fsname, const char *snapname);
↓ open down ↓ 551 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX