summaryrefslogtreecommitdiffstats
path: root/module/zfs/vdev_removal.c
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2019-09-12 13:28:26 -0700
committerBrian Behlendorf <[email protected]>2019-09-12 13:28:26 -0700
commit74756182d2da0f8889b3a0a1fded274a2baa14f5 (patch)
tree37aa242f27bb1e97be087b48362abbfb69d16412 /module/zfs/vdev_removal.c
parentd66620681d85105256203b4f4407f0092e5a7fe7 (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/vdev_removal.c')
-rw-r--r--module/zfs/vdev_removal.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/module/zfs/vdev_removal.c b/module/zfs/vdev_removal.c
index c9156054c..abec4d50f 100644
--- a/module/zfs/vdev_removal.c
+++ b/module/zfs/vdev_removal.c
@@ -347,7 +347,7 @@ vdev_remove_initiate_sync(void *arg, dmu_tx_t *tx)
vic->vic_mapping_object);
spa_history_log_internal(spa, "vdev remove started", tx,
- "%s vdev %llu %s", spa_name(spa), vd->vdev_id,
+ "%s vdev %llu %s", spa_name(spa), (u_longlong_t)vd->vdev_id,
(vd->vdev_path != NULL) ? vd->vdev_path : "-");
/*
* Setting spa_vdev_removal causes subsequent frees to call
@@ -1111,7 +1111,7 @@ vdev_remove_complete_sync(void *arg, dmu_tx_t *tx)
spa_finish_removal(dmu_tx_pool(tx)->dp_spa, DSS_FINISHED, tx);
/* vd->vdev_path is not available here */
spa_history_log_internal(spa, "vdev remove completed", tx,
- "%s vdev %llu", spa_name(spa), vd->vdev_id);
+ "%s vdev %llu", spa_name(spa), (u_longlong_t)vd->vdev_id);
}
static void
@@ -1757,7 +1757,8 @@ spa_vdev_remove_cancel_sync(void *arg, dmu_tx_t *tx)
vd->vdev_id, dmu_tx_get_txg(tx));
spa_history_log_internal(spa, "vdev remove canceled", tx,
"%s vdev %llu %s", spa_name(spa),
- vd->vdev_id, (vd->vdev_path != NULL) ? vd->vdev_path : "-");
+ (u_longlong_t)vd->vdev_id,
+ (vd->vdev_path != NULL) ? vd->vdev_path : "-");
}
static int