Unbreak the scan status ABI

When d4a72f23 was merged, pss_pass_issued was incorrectly
added to the middle of the pool_scan_stat_t structure
instead of the end. This patch simply corrects this issue.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #6909
This commit is contained in:
Tom Caputi 2017-11-30 12:40:13 -05:00 committed by Brian Behlendorf
parent ed15d54481
commit d4677269f2
2 changed files with 6 additions and 6 deletions

View File

@ -866,11 +866,11 @@ typedef struct pool_scan_stat {
/* values not stored on disk */ /* values not stored on disk */
uint64_t pss_pass_exam; /* examined bytes per scan pass */ uint64_t pss_pass_exam; /* examined bytes per scan pass */
uint64_t pss_pass_issued; /* issued bytes per scan pass */
uint64_t pss_pass_start; /* start time of a scan pass */ uint64_t pss_pass_start; /* start time of a scan pass */
uint64_t pss_pass_scrub_pause; /* pause time of a scurb pass */ uint64_t pss_pass_scrub_pause; /* pause time of a scurb pass */
/* cumulative time scrub spent paused, needed for rate calculation */ /* cumulative time scrub spent paused, needed for rate calculation */
uint64_t pss_pass_scrub_spent_paused; uint64_t pss_pass_scrub_spent_paused;
uint64_t pss_pass_issued; /* issued bytes per scan pass */
uint64_t pss_issued; /* total bytes checked by scanner */ uint64_t pss_issued; /* total bytes checked by scanner */
} pool_scan_stat_t; } pool_scan_stat_t;

View File

@ -2040,19 +2040,19 @@ spa_scan_get_stats(spa_t *spa, pool_scan_stat_t *ps)
ps->pss_start_time = scn->scn_phys.scn_start_time; ps->pss_start_time = scn->scn_phys.scn_start_time;
ps->pss_end_time = scn->scn_phys.scn_end_time; ps->pss_end_time = scn->scn_phys.scn_end_time;
ps->pss_to_examine = scn->scn_phys.scn_to_examine; ps->pss_to_examine = scn->scn_phys.scn_to_examine;
ps->pss_examined = scn->scn_phys.scn_examined;
ps->pss_to_process = scn->scn_phys.scn_to_process; ps->pss_to_process = scn->scn_phys.scn_to_process;
ps->pss_processed = scn->scn_phys.scn_processed; ps->pss_processed = scn->scn_phys.scn_processed;
ps->pss_errors = scn->scn_phys.scn_errors; ps->pss_errors = scn->scn_phys.scn_errors;
ps->pss_examined = scn->scn_phys.scn_examined;
ps->pss_issued =
scn->scn_issued_before_pass + spa->spa_scan_pass_issued;
/* data not stored on disk */ /* data not stored on disk */
ps->pss_pass_start = spa->spa_scan_pass_start;
ps->pss_pass_exam = spa->spa_scan_pass_exam; ps->pss_pass_exam = spa->spa_scan_pass_exam;
ps->pss_pass_issued = spa->spa_scan_pass_issued; ps->pss_pass_start = spa->spa_scan_pass_start;
ps->pss_pass_scrub_pause = spa->spa_scan_pass_scrub_pause; ps->pss_pass_scrub_pause = spa->spa_scan_pass_scrub_pause;
ps->pss_pass_scrub_spent_paused = spa->spa_scan_pass_scrub_spent_paused; ps->pss_pass_scrub_spent_paused = spa->spa_scan_pass_scrub_spent_paused;
ps->pss_pass_issued = spa->spa_scan_pass_issued;
ps->pss_issued =
scn->scn_issued_before_pass + spa->spa_scan_pass_issued;
return (0); return (0);
} }