Commit 8810d3d5 authored by Mike Snitzer's avatar Mike Snitzer

dm vdo block-map: use uds_log_ratelimit() rather than open code it

Signed-off-by: default avatarMike Snitzer <snitzer@kernel.org>
Signed-off-by: default avatarMatthew Sakai <msakai@redhat.com>
parent 6bda1072
...@@ -1014,14 +1014,10 @@ static void handle_page_write_error(struct vdo_completion *completion) ...@@ -1014,14 +1014,10 @@ static void handle_page_write_error(struct vdo_completion *completion)
/* If we're already read-only, write failures are to be expected. */ /* If we're already read-only, write failures are to be expected. */
if (result != VDO_READ_ONLY) { if (result != VDO_READ_ONLY) {
static DEFINE_RATELIMIT_STATE(error_limiter, DEFAULT_RATELIMIT_INTERVAL, uds_log_ratelimit(uds_log_error,
DEFAULT_RATELIMIT_BURST); "failed to write block map page %llu",
if (__ratelimit(&error_limiter)) {
uds_log_error("failed to write block map page %llu",
(unsigned long long) info->pbn); (unsigned long long) info->pbn);
} }
}
set_info_state(info, PS_DIRTY); set_info_state(info, PS_DIRTY);
ADD_ONCE(cache->stats.failed_writes, 1); ADD_ONCE(cache->stats.failed_writes, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment