Print this page
zpool import speedup


 553                     (u_longlong_t)bp->blk_cksum.zc_word[1],          \
 554                     (u_longlong_t)bp->blk_cksum.zc_word[2],          \
 555                     (u_longlong_t)bp->blk_cksum.zc_word[3]);         \
 556         }                                                               \
 557         ASSERT(len < size);                                          \
 558 }
 559 
 560 #include <sys/dmu.h>
 561 
 562 #define BP_GET_BUFC_TYPE(bp)                                            \
 563         (((BP_GET_LEVEL(bp) > 0) || (DMU_OT_IS_METADATA(BP_GET_TYPE(bp)))) ? \
 564         ARC_BUFC_METADATA : ARC_BUFC_DATA)
 565 
 566 typedef enum spa_import_type {
 567         SPA_IMPORT_EXISTING,
 568         SPA_IMPORT_ASSEMBLE
 569 } spa_import_type_t;
 570 
 571 /* state manipulation functions */
 572 extern int spa_open(const char *pool, spa_t **, void *tag);

 573 extern int spa_open_rewind(const char *pool, spa_t **, void *tag,
 574     nvlist_t *policy, nvlist_t **config);
 575 extern int spa_get_stats(const char *pool, nvlist_t **config, char *altroot,
 576     size_t buflen);
 577 extern int spa_create(const char *pool, nvlist_t *config, nvlist_t *props,
 578     nvlist_t *zplprops);
 579 extern int spa_import_rootpool(char *devpath, char *devid);
 580 extern int spa_import(const char *pool, nvlist_t *config, nvlist_t *props,
 581     uint64_t flags);
 582 extern nvlist_t *spa_tryimport(nvlist_t *tryconfig);
 583 extern int spa_destroy(char *pool);
 584 extern int spa_export(char *pool, nvlist_t **oldconfig, boolean_t force,
 585     boolean_t hardforce);
 586 extern int spa_reset(char *pool);
 587 extern void spa_async_request(spa_t *spa, int flag);
 588 extern void spa_async_unrequest(spa_t *spa, int flag);
 589 extern void spa_async_suspend(spa_t *spa);
 590 extern void spa_async_resume(spa_t *spa);
 591 extern spa_t *spa_inject_addref(char *pool);
 592 extern void spa_inject_delref(spa_t *spa);




 553                     (u_longlong_t)bp->blk_cksum.zc_word[1],          \
 554                     (u_longlong_t)bp->blk_cksum.zc_word[2],          \
 555                     (u_longlong_t)bp->blk_cksum.zc_word[3]);         \
 556         }                                                               \
 557         ASSERT(len < size);                                          \
 558 }
 559 
 560 #include <sys/dmu.h>
 561 
 562 #define BP_GET_BUFC_TYPE(bp)                                            \
 563         (((BP_GET_LEVEL(bp) > 0) || (DMU_OT_IS_METADATA(BP_GET_TYPE(bp)))) ? \
 564         ARC_BUFC_METADATA : ARC_BUFC_DATA)
 565 
 566 typedef enum spa_import_type {
 567         SPA_IMPORT_EXISTING,
 568         SPA_IMPORT_ASSEMBLE
 569 } spa_import_type_t;
 570 
 571 /* state manipulation functions */
 572 extern int spa_open(const char *pool, spa_t **, void *tag);
 573 extern int spa_open_lock(const char *pool, spa_t **, void *tag, int lock);
 574 extern int spa_open_rewind(const char *pool, spa_t **, void *tag,
 575     nvlist_t *policy, nvlist_t **config);
 576 extern int spa_get_stats(const char *pool, nvlist_t **config, char *altroot,
 577     size_t buflen);
 578 extern int spa_create(const char *pool, nvlist_t *config, nvlist_t *props,
 579     nvlist_t *zplprops);
 580 extern int spa_import_rootpool(char *devpath, char *devid);
 581 extern int spa_import(const char *pool, nvlist_t *config, nvlist_t *props,
 582     uint64_t flags);
 583 extern nvlist_t *spa_tryimport(nvlist_t *tryconfig);
 584 extern int spa_destroy(char *pool);
 585 extern int spa_export(char *pool, nvlist_t **oldconfig, boolean_t force,
 586     boolean_t hardforce);
 587 extern int spa_reset(char *pool);
 588 extern void spa_async_request(spa_t *spa, int flag);
 589 extern void spa_async_unrequest(spa_t *spa, int flag);
 590 extern void spa_async_suspend(spa_t *spa);
 591 extern void spa_async_resume(spa_t *spa);
 592 extern spa_t *spa_inject_addref(char *pool);
 593 extern void spa_inject_delref(spa_t *spa);