diff options
author | Matthew Macy <[email protected]> | 2019-09-12 13:28:26 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-09-12 13:28:26 -0700 |
commit | 74756182d2da0f8889b3a0a1fded274a2baa14f5 (patch) | |
tree | 37aa242f27bb1e97be087b48362abbfb69d16412 /module/zfs/dsl_scan.c | |
parent | d66620681d85105256203b4f4407f0092e5a7fe7 (diff) |
Enable compiler to typecheck logging
Annotate spa logging declarations with printflike
Workaround gcc bug (non disable-able warning) by
replacing "" with " "
Reviewed-by: Matt Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Matt Macy <[email protected]>
Closes #9316
Diffstat (limited to 'module/zfs/dsl_scan.c')
-rw-r--r-- | module/zfs/dsl_scan.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/module/zfs/dsl_scan.c b/module/zfs/dsl_scan.c index ec71a6d91..7845f1de2 100644 --- a/module/zfs/dsl_scan.c +++ b/module/zfs/dsl_scan.c @@ -759,7 +759,8 @@ dsl_scan_setup_sync(void *arg, dmu_tx_t *tx) spa_history_log_internal(spa, "scan setup", tx, "func=%u mintxg=%llu maxtxg=%llu", - *funcp, scn->scn_phys.scn_min_txg, scn->scn_phys.scn_max_txg); + *funcp, (u_longlong_t)scn->scn_phys.scn_min_txg, + (u_longlong_t)scn->scn_phys.scn_max_txg); } /* @@ -900,13 +901,13 @@ dsl_scan_done(dsl_scan_t *scn, boolean_t complete, dmu_tx_t *tx) if (dsl_scan_restarting(scn, tx)) spa_history_log_internal(spa, "scan aborted, restarting", tx, - "errors=%llu", spa_get_errlog_size(spa)); + "errors=%llu", (u_longlong_t)spa_get_errlog_size(spa)); else if (!complete) spa_history_log_internal(spa, "scan cancelled", tx, - "errors=%llu", spa_get_errlog_size(spa)); + "errors=%llu", (u_longlong_t)spa_get_errlog_size(spa)); else spa_history_log_internal(spa, "scan done", tx, - "errors=%llu", spa_get_errlog_size(spa)); + "errors=%llu", (u_longlong_t)spa_get_errlog_size(spa)); if (DSL_SCAN_IS_SCRUB_RESILVER(scn)) { spa->spa_scrub_started = B_FALSE; @@ -957,7 +958,8 @@ dsl_scan_done(dsl_scan_t *scn, boolean_t complete, dmu_tx_t *tx) if (resilver_needed) { spa_history_log_internal(spa, "starting deferred resilver", tx, - "errors=%llu", spa_get_errlog_size(spa)); + "errors=%llu", + (u_longlong_t)spa_get_errlog_size(spa)); spa_async_request(spa, SPA_ASYNC_RESILVER); } } |