diff options
author | Olaf Faaland <[email protected]> | 2018-02-22 15:34:34 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-02-22 15:34:34 -0800 |
commit | 7088545d0166aa05b2c783f18aa821d95a1f023d (patch) | |
tree | 18d65e20a458db4c8c67a2ddeb24ff12a83d4aef /include/sys/spa.h | |
parent | 0d398b25644ff1eb67141629bc6e5aead95edeba (diff) |
Report duration and error in mmp_history entries
After an MMP write completes, update the relevant mmp_history entry
with the time between submission and completion, and the error
status of the write.
[faaland1@toss3a zfs]$ cat /proc/spl/kstat/zfs/pool/multihost
39 0 0x01 100 8800 69147946270893 72723903122926
id txg timestamp error duration mmp_delay vdev_guid
10607 1166 1518985089 0 138301 637785455 4882...
10608 1166 1518985089 0 136154 635407747 1151...
10609 1166 1518985089 0 803618560 633048078 9740...
10610 1166 1518985090 0 144826 633048078 4882...
10611 1166 1518985090 0 164527 666187671 1151...
Where duration = gethrtime_in_done_fn - gethrtime_at_submission, and
error = zio->io_error.
Reviewed-by: Giuseppe Di Natale <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Olaf Faaland <[email protected]>
Closes #7190
Diffstat (limited to 'include/sys/spa.h')
-rw-r--r-- | include/sys/spa.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/sys/spa.h b/include/sys/spa.h index 7bc3b2197..7b529330f 100644 --- a/include/sys/spa.h +++ b/include/sys/spa.h @@ -887,8 +887,10 @@ extern txg_stat_t *spa_txg_history_init_io(spa_t *, uint64_t, struct dsl_pool *); extern void spa_txg_history_fini_io(spa_t *, txg_stat_t *); extern void spa_tx_assign_add_nsecs(spa_t *spa, uint64_t nsecs); +extern int spa_mmp_history_set(spa_t *spa, uint64_t mmp_kstat_id, int io_error, + hrtime_t duration); extern void spa_mmp_history_add(uint64_t txg, uint64_t timestamp, - uint64_t mmp_delay, vdev_t *vd, int label); + uint64_t mmp_delay, vdev_t *vd, int label, uint64_t mmp_kstat_id); /* Pool configuration locks */ extern int spa_config_tryenter(spa_t *spa, int locks, void *tag, krw_t rw); |