diff options
author | Arne Jansen <[email protected]> | 2015-05-06 09:07:55 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-06-09 13:48:02 -0700 |
commit | 9c43027b3f18769f2ace16eaa222ac8b301501f4 (patch) | |
tree | 90a3577807c203ca9022234405b30e7a7fdcad2d /include | |
parent | d050c627b5fdfaf72eac90bc07e03fcb2d8a123f (diff) |
Illumos 5269 - zpool import slow
5269 zpool import slow
Reviewed by: Matthew Ahrens <[email protected]>
Reviewed by: George Wilson <[email protected]>
Reviewed by: Dan McDonald <[email protected]>
Approved by: Dan McDonald <[email protected]>
References:
https://www.illumos.org/issues/5269
https://github.com/illumos/illumos-gate/commit/12380e1e
Ported-by: DHE <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #3396
Diffstat (limited to 'include')
-rw-r--r-- | include/sys/dmu.h | 1 | ||||
-rw-r--r-- | include/sys/dmu_objset.h | 2 | ||||
-rw-r--r-- | include/sys/dsl_pool.h | 1 | ||||
-rw-r--r-- | include/sys/vdev.h | 1 | ||||
-rw-r--r-- | include/sys/zil.h | 9 |
5 files changed, 12 insertions, 2 deletions
diff --git a/include/sys/dmu.h b/include/sys/dmu.h index d3874335b..a010a68c4 100644 --- a/include/sys/dmu.h +++ b/include/sys/dmu.h @@ -240,6 +240,7 @@ void zfs_znode_byteswap(void *buf, size_t size); #define DS_FIND_SNAPSHOTS (1<<0) #define DS_FIND_CHILDREN (1<<1) +#define DS_FIND_SERIALIZE (1<<2) /* * The maximum number of bytes that can be accessed as part of one diff --git a/include/sys/dmu_objset.h b/include/sys/dmu_objset.h index 8cb7bd02f..bee4bbcfc 100644 --- a/include/sys/dmu_objset.h +++ b/include/sys/dmu_objset.h @@ -142,6 +142,8 @@ struct objset { int dmu_objset_hold(const char *name, void *tag, objset_t **osp); int dmu_objset_own(const char *name, dmu_objset_type_t type, boolean_t readonly, void *tag, objset_t **osp); +int dmu_objset_own_obj(struct dsl_pool *dp, uint64_t obj, + dmu_objset_type_t type, boolean_t readonly, void *tag, objset_t **osp); void dmu_objset_refresh_ownership(objset_t *os, void *tag); void dmu_objset_rele(objset_t *os, void *tag); void dmu_objset_disown(objset_t *os, void *tag); diff --git a/include/sys/dsl_pool.h b/include/sys/dsl_pool.h index 34dc65ba4..b2b9128e5 100644 --- a/include/sys/dsl_pool.h +++ b/include/sys/dsl_pool.h @@ -158,6 +158,7 @@ boolean_t dsl_pool_need_dirty_delay(dsl_pool_t *dp); void dsl_pool_config_enter(dsl_pool_t *dp, void *tag); void dsl_pool_config_exit(dsl_pool_t *dp, void *tag); boolean_t dsl_pool_config_held(dsl_pool_t *dp); +boolean_t dsl_pool_config_held_writer(dsl_pool_t *dp); taskq_t *dsl_pool_iput_taskq(dsl_pool_t *dp); diff --git a/include/sys/vdev.h b/include/sys/vdev.h index bef6aaf8f..365789e52 100644 --- a/include/sys/vdev.h +++ b/include/sys/vdev.h @@ -59,6 +59,7 @@ extern zio_t *vdev_probe(vdev_t *vd, zio_t *pio); extern boolean_t vdev_is_bootable(vdev_t *vd); extern vdev_t *vdev_lookup_top(spa_t *spa, uint64_t vdev); extern vdev_t *vdev_lookup_by_guid(vdev_t *vd, uint64_t guid); +extern int vdev_count_leaves(spa_t *spa); extern void vdev_dtl_dirty(vdev_t *vd, vdev_dtl_type_t d, uint64_t txg, uint64_t size); extern boolean_t vdev_dtl_contains(vdev_t *vd, vdev_dtl_type_t d, diff --git a/include/sys/zil.h b/include/sys/zil.h index 362304135..65b14f1cd 100644 --- a/include/sys/zil.h +++ b/include/sys/zil.h @@ -37,6 +37,9 @@ extern "C" { #endif +struct dsl_pool; +struct dsl_dataset; + /* * Intent log format: * @@ -466,8 +469,10 @@ extern void zil_itx_assign(zilog_t *zilog, itx_t *itx, dmu_tx_t *tx); extern void zil_commit(zilog_t *zilog, uint64_t oid); extern int zil_vdev_offline(const char *osname, void *txarg); -extern int zil_claim(const char *osname, void *txarg); -extern int zil_check_log_chain(const char *osname, void *txarg); +extern int zil_claim(struct dsl_pool *dp, + struct dsl_dataset *ds, void *txarg); +extern int zil_check_log_chain(struct dsl_pool *dp, + struct dsl_dataset *ds, void *tx); extern void zil_sync(zilog_t *zilog, dmu_tx_t *tx); extern void zil_clean(zilog_t *zilog, uint64_t synced_txg); |