Print this page
3748 zfs headers should be C++ compatible
Submitted by:   Justin Gibbs <justing@spectralogic.com>
Submitted by:   Will Andrews <willa@spectralogic.com>
Reviewed by:    Matthew Ahrens <mahrens@delphix.com>


 627 extern uint64_t strtonum(const char *str, char **nptr);
 628 
 629 extern char *spa_his_ievent_table[];
 630 
 631 extern void spa_history_create_obj(spa_t *spa, dmu_tx_t *tx);
 632 extern int spa_history_get(spa_t *spa, uint64_t *offset, uint64_t *len_read,
 633     char *his_buf);
 634 extern int spa_history_log(spa_t *spa, const char *his_buf);
 635 extern int spa_history_log_nvl(spa_t *spa, nvlist_t *nvl);
 636 extern void spa_history_log_version(spa_t *spa, const char *operation);
 637 extern void spa_history_log_internal(spa_t *spa, const char *operation,
 638     dmu_tx_t *tx, const char *fmt, ...);
 639 extern void spa_history_log_internal_ds(struct dsl_dataset *ds, const char *op,
 640     dmu_tx_t *tx, const char *fmt, ...);
 641 extern void spa_history_log_internal_dd(dsl_dir_t *dd, const char *operation,
 642     dmu_tx_t *tx, const char *fmt, ...);
 643 
 644 /* error handling */
 645 struct zbookmark;
 646 extern void spa_log_error(spa_t *spa, zio_t *zio);
 647 extern void zfs_ereport_post(const char *class, spa_t *spa, vdev_t *vd,
 648     zio_t *zio, uint64_t stateoroffset, uint64_t length);
 649 extern void zfs_post_remove(spa_t *spa, vdev_t *vd);
 650 extern void zfs_post_state_change(spa_t *spa, vdev_t *vd);
 651 extern void zfs_post_autoreplace(spa_t *spa, vdev_t *vd);
 652 extern uint64_t spa_get_errlog_size(spa_t *spa);
 653 extern int spa_get_errlog(spa_t *spa, void *uaddr, size_t *count);
 654 extern void spa_errlog_rotate(spa_t *spa);
 655 extern void spa_errlog_drain(spa_t *spa);
 656 extern void spa_errlog_sync(spa_t *spa, uint64_t txg);
 657 extern void spa_get_errlists(spa_t *spa, avl_tree_t *last, avl_tree_t *scrub);
 658 
 659 /* vdev cache */
 660 extern void vdev_cache_stat_init(void);
 661 extern void vdev_cache_stat_fini(void);
 662 
 663 /* Initialization and termination */
 664 extern void spa_init(int flags);
 665 extern void spa_fini(void);
 666 extern void spa_boot_init();
 667 




 627 extern uint64_t strtonum(const char *str, char **nptr);
 628 
 629 extern char *spa_his_ievent_table[];
 630 
 631 extern void spa_history_create_obj(spa_t *spa, dmu_tx_t *tx);
 632 extern int spa_history_get(spa_t *spa, uint64_t *offset, uint64_t *len_read,
 633     char *his_buf);
 634 extern int spa_history_log(spa_t *spa, const char *his_buf);
 635 extern int spa_history_log_nvl(spa_t *spa, nvlist_t *nvl);
 636 extern void spa_history_log_version(spa_t *spa, const char *operation);
 637 extern void spa_history_log_internal(spa_t *spa, const char *operation,
 638     dmu_tx_t *tx, const char *fmt, ...);
 639 extern void spa_history_log_internal_ds(struct dsl_dataset *ds, const char *op,
 640     dmu_tx_t *tx, const char *fmt, ...);
 641 extern void spa_history_log_internal_dd(dsl_dir_t *dd, const char *operation,
 642     dmu_tx_t *tx, const char *fmt, ...);
 643 
 644 /* error handling */
 645 struct zbookmark;
 646 extern void spa_log_error(spa_t *spa, zio_t *zio);
 647 extern void zfs_ereport_post(const char *subclass, spa_t *spa, vdev_t *vd,
 648     zio_t *zio, uint64_t stateoroffset, uint64_t length);
 649 extern void zfs_post_remove(spa_t *spa, vdev_t *vd);
 650 extern void zfs_post_state_change(spa_t *spa, vdev_t *vd);
 651 extern void zfs_post_autoreplace(spa_t *spa, vdev_t *vd);
 652 extern uint64_t spa_get_errlog_size(spa_t *spa);
 653 extern int spa_get_errlog(spa_t *spa, void *uaddr, size_t *count);
 654 extern void spa_errlog_rotate(spa_t *spa);
 655 extern void spa_errlog_drain(spa_t *spa);
 656 extern void spa_errlog_sync(spa_t *spa, uint64_t txg);
 657 extern void spa_get_errlists(spa_t *spa, avl_tree_t *last, avl_tree_t *scrub);
 658 
 659 /* vdev cache */
 660 extern void vdev_cache_stat_init(void);
 661 extern void vdev_cache_stat_fini(void);
 662 
 663 /* Initialization and termination */
 664 extern void spa_init(int flags);
 665 extern void spa_fini(void);
 666 extern void spa_boot_init();
 667