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>


 226         DMU_OTN_ZAP_METADATA = DMU_OT(DMU_BSWAP_ZAP, B_TRUE),
 227 } dmu_object_type_t;
 228 
 229 typedef enum txg_how {
 230         TXG_WAIT = 1,
 231         TXG_NOWAIT,
 232         TXG_WAITED,
 233 } txg_how_t;
 234 
 235 void byteswap_uint64_array(void *buf, size_t size);
 236 void byteswap_uint32_array(void *buf, size_t size);
 237 void byteswap_uint16_array(void *buf, size_t size);
 238 void byteswap_uint8_array(void *buf, size_t size);
 239 void zap_byteswap(void *buf, size_t size);
 240 void zfs_oldacl_byteswap(void *buf, size_t size);
 241 void zfs_acl_byteswap(void *buf, size_t size);
 242 void zfs_znode_byteswap(void *buf, size_t size);
 243 
 244 #define DS_FIND_SNAPSHOTS       (1<<0)
 245 #define DS_FIND_CHILDREN        (1<<1)

 246 
 247 /*
 248  * The maximum number of bytes that can be accessed as part of one
 249  * operation, including metadata.
 250  */
 251 #define DMU_MAX_ACCESS (32 * 1024 * 1024) /* 32MB */
 252 #define DMU_MAX_DELETEBLKCNT (20480) /* ~5MB of indirect blocks */
 253 
 254 #define DMU_USERUSED_OBJECT     (-1ULL)
 255 #define DMU_GROUPUSED_OBJECT    (-2ULL)
 256 
 257 /*
 258  * artificial blkids for bonus buffer and spill blocks
 259  */
 260 #define DMU_BONUS_BLKID         (-1ULL)
 261 #define DMU_SPILL_BLKID         (-2ULL)
 262 /*
 263  * Public routines to create, destroy, open, and close objsets.
 264  */
 265 int dmu_objset_hold(const char *name, void *tag, objset_t **osp);




 226         DMU_OTN_ZAP_METADATA = DMU_OT(DMU_BSWAP_ZAP, B_TRUE),
 227 } dmu_object_type_t;
 228 
 229 typedef enum txg_how {
 230         TXG_WAIT = 1,
 231         TXG_NOWAIT,
 232         TXG_WAITED,
 233 } txg_how_t;
 234 
 235 void byteswap_uint64_array(void *buf, size_t size);
 236 void byteswap_uint32_array(void *buf, size_t size);
 237 void byteswap_uint16_array(void *buf, size_t size);
 238 void byteswap_uint8_array(void *buf, size_t size);
 239 void zap_byteswap(void *buf, size_t size);
 240 void zfs_oldacl_byteswap(void *buf, size_t size);
 241 void zfs_acl_byteswap(void *buf, size_t size);
 242 void zfs_znode_byteswap(void *buf, size_t size);
 243 
 244 #define DS_FIND_SNAPSHOTS       (1<<0)
 245 #define DS_FIND_CHILDREN        (1<<1)
 246 #define DS_FIND_SERIALIZE       (1<<2)
 247 
 248 /*
 249  * The maximum number of bytes that can be accessed as part of one
 250  * operation, including metadata.
 251  */
 252 #define DMU_MAX_ACCESS (32 * 1024 * 1024) /* 32MB */
 253 #define DMU_MAX_DELETEBLKCNT (20480) /* ~5MB of indirect blocks */
 254 
 255 #define DMU_USERUSED_OBJECT     (-1ULL)
 256 #define DMU_GROUPUSED_OBJECT    (-2ULL)
 257 
 258 /*
 259  * artificial blkids for bonus buffer and spill blocks
 260  */
 261 #define DMU_BONUS_BLKID         (-1ULL)
 262 #define DMU_SPILL_BLKID         (-2ULL)
 263 /*
 264  * Public routines to create, destroy, open, and close objsets.
 265  */
 266 int dmu_objset_hold(const char *name, void *tag, objset_t **osp);