mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Emit history events for 'zpool create'
History commands and events were being suppressed for the 'zpool create' command since the history object did not yet exist. Create the object earlier so this history doesn't get lost. Split the pool_destroy event in to pool_destroy and pool_export so they may be distinguished. Updated events_001_pos and events_002_pos test cases. They now check for the expected history events and were reworked to be more reliable. Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com> Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #6712 Closes #6486
This commit is contained in:
+2
-1
@@ -1005,7 +1005,8 @@ extern int spa_history_get(spa_t *spa, uint64_t *offset, uint64_t *len_read,
|
||||
char *his_buf);
|
||||
extern int spa_history_log(spa_t *spa, const char *his_buf);
|
||||
extern int spa_history_log_nvl(spa_t *spa, nvlist_t *nvl);
|
||||
extern void spa_history_log_version(spa_t *spa, const char *operation);
|
||||
extern void spa_history_log_version(spa_t *spa, const char *operation,
|
||||
dmu_tx_t *tx);
|
||||
extern void spa_history_log_internal(spa_t *spa, const char *operation,
|
||||
dmu_tx_t *tx, const char *fmt, ...);
|
||||
extern void spa_history_log_internal_ds(struct dsl_dataset *ds, const char *op,
|
||||
|
||||
@@ -101,6 +101,7 @@ extern "C" {
|
||||
#define ESC_ZFS_POOL_CREATE "pool_create"
|
||||
#define ESC_ZFS_POOL_DESTROY "pool_destroy"
|
||||
#define ESC_ZFS_POOL_IMPORT "pool_import"
|
||||
#define ESC_ZFS_POOL_EXPORT "pool_export"
|
||||
#define ESC_ZFS_VDEV_ADD "vdev_add"
|
||||
#define ESC_ZFS_VDEV_ATTACH "vdev_attach"
|
||||
#define ESC_ZFS_VDEV_CLEAR "vdev_clear"
|
||||
|
||||
Reference in New Issue
Block a user