diff options
author | Mike Snitzer <snitzer@kernel.org> | 2024-01-27 05:42:28 +0300 |
---|---|---|
committer | Mike Snitzer <snitzer@kernel.org> | 2024-02-20 21:43:17 +0300 |
commit | c10497b3b11d0d040eaff25bef47dec569ae0779 (patch) | |
tree | 7b92f8220ddb41788d551305006bbb2e334b5604 | |
parent | 86492a3f698de5d66777ba18e06e030cb2c5cf9a (diff) | |
download | linux-c10497b3b11d0d040eaff25bef47dec569ae0779.tar.xz |
dm vdo: rename uds_map_to_system_error to uds_status_to_errno
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Susan LeGendre-McGhee <slegendr@redhat.com>
Signed-off-by: Matthew Sakai <msakai@redhat.com>
-rw-r--r-- | drivers/md/dm-vdo/errors.c | 2 | ||||
-rw-r--r-- | drivers/md/dm-vdo/errors.h | 2 | ||||
-rw-r--r-- | drivers/md/dm-vdo/index-layout.c | 4 | ||||
-rw-r--r-- | drivers/md/dm-vdo/index-session.c | 20 |
4 files changed, 14 insertions, 14 deletions
diff --git a/drivers/md/dm-vdo/errors.c b/drivers/md/dm-vdo/errors.c index d19504a1445e..e8599599a377 100644 --- a/drivers/md/dm-vdo/errors.c +++ b/drivers/md/dm-vdo/errors.c @@ -219,7 +219,7 @@ const char *uds_string_error_name(int errnum, char *buf, size_t buflen) * system-generated value (such as -EIO), or an internal UDS status code. The result will be a * negative errno value. */ -int uds_map_to_system_error(int error) +int uds_status_to_errno(int error) { char error_name[UDS_MAX_ERROR_NAME_SIZE]; char error_message[UDS_MAX_ERROR_MESSAGE_SIZE]; diff --git a/drivers/md/dm-vdo/errors.h b/drivers/md/dm-vdo/errors.h index c37f198a159c..cf15d7243204 100644 --- a/drivers/md/dm-vdo/errors.h +++ b/drivers/md/dm-vdo/errors.h @@ -71,7 +71,7 @@ const char * __must_check uds_string_error(int errnum, char *buf, size_t buflen) const char *uds_string_error_name(int errnum, char *buf, size_t buflen); -int uds_map_to_system_error(int error); +int uds_status_to_errno(int error); int uds_register_error_block(const char *block_name, int first_error, int last_reserved_error, const struct error_info *infos, diff --git a/drivers/md/dm-vdo/index-layout.c b/drivers/md/dm-vdo/index-layout.c index 4dffa82a3c43..6446a1f58641 100644 --- a/drivers/md/dm-vdo/index-layout.c +++ b/drivers/md/dm-vdo/index-layout.c @@ -267,13 +267,13 @@ int uds_compute_index_size(const struct uds_parameters *parameters, u64 *index_s result = uds_make_configuration(parameters, &index_config); if (result != UDS_SUCCESS) { uds_log_error_strerror(result, "cannot compute index size"); - return uds_map_to_system_error(result); + return uds_status_to_errno(result); } result = compute_sizes(index_config, &sizes); uds_free_configuration(index_config); if (result != UDS_SUCCESS) - return uds_map_to_system_error(result); + return uds_status_to_errno(result); *index_size = sizes.total_size; return UDS_SUCCESS; diff --git a/drivers/md/dm-vdo/index-session.c b/drivers/md/dm-vdo/index-session.c index 615c7b840d7b..73c2927f74ce 100644 --- a/drivers/md/dm-vdo/index-session.c +++ b/drivers/md/dm-vdo/index-session.c @@ -210,7 +210,7 @@ static void handle_callbacks(struct uds_request *request) if (request->status == UDS_SUCCESS) update_session_stats(request); - request->status = uds_map_to_system_error(request->status); + request->status = uds_status_to_errno(request->status); request->callback(request); release_index_session(index_session); } @@ -276,7 +276,7 @@ int uds_create_index_session(struct uds_index_session **session) return -EINVAL; } - return uds_map_to_system_error(make_empty_index_session(session)); + return uds_status_to_errno(make_empty_index_session(session)); } static int __must_check start_loading_index_session(struct uds_index_session *index_session) @@ -374,7 +374,7 @@ int uds_open_index(enum uds_open_index_type open_type, result = start_loading_index_session(session); if (result != UDS_SUCCESS) - return uds_map_to_system_error(result); + return uds_status_to_errno(result); session->parameters = *parameters; format_dev_t(name, parameters->bdev->bd_dev); @@ -386,7 +386,7 @@ int uds_open_index(enum uds_open_index_type open_type, get_open_type_string(open_type)); finish_loading_index_session(session, result); - return uds_map_to_system_error(result); + return uds_status_to_errno(result); } static void wait_for_no_requests_in_progress(struct uds_index_session *index_session) @@ -470,7 +470,7 @@ int uds_suspend_index_session(struct uds_index_session *session, bool save) uds_unlock_mutex(&session->request_mutex); if (no_work) - return uds_map_to_system_error(result); + return uds_status_to_errno(result); if (rebuilding) suspend_rebuild(session); @@ -484,7 +484,7 @@ int uds_suspend_index_session(struct uds_index_session *session, bool save) session->state |= IS_FLAG_SUSPENDED; uds_broadcast_cond(&session->request_cond); uds_unlock_mutex(&session->request_mutex); - return uds_map_to_system_error(result); + return uds_status_to_errno(result); } static int replace_device(struct uds_index_session *session, struct block_device *bdev) @@ -536,7 +536,7 @@ int uds_resume_index_session(struct uds_index_session *session, session->state &= ~IS_FLAG_WAITING; uds_broadcast_cond(&session->request_cond); uds_unlock_mutex(&session->request_mutex); - return uds_map_to_system_error(result); + return uds_status_to_errno(result); } } @@ -635,7 +635,7 @@ int uds_close_index(struct uds_index_session *index_session) } uds_unlock_mutex(&index_session->request_mutex); if (result != UDS_SUCCESS) - return uds_map_to_system_error(result); + return uds_status_to_errno(result); uds_log_debug("Closing index"); wait_for_no_requests_in_progress(index_session); @@ -646,7 +646,7 @@ int uds_close_index(struct uds_index_session *index_session) index_session->state &= ~IS_FLAG_CLOSING; uds_broadcast_cond(&index_session->request_cond); uds_unlock_mutex(&index_session->request_mutex); - return uds_map_to_system_error(result); + return uds_status_to_errno(result); } /* This will save and close an open index before destroying the session. */ @@ -702,7 +702,7 @@ int uds_destroy_index_session(struct uds_index_session *index_session) uds_destroy_mutex(&index_session->request_mutex); uds_log_debug("Destroyed index session"); uds_free(index_session); - return uds_map_to_system_error(result); + return uds_status_to_errno(result); } /* Wait until all callbacks for index operations are complete. */ |