[PATCH 3/3] dm vdo: rename vdo_map_to_system_error to vdo_status_to_errno

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Mike Snitzer <snitzer@xxxxxxxxxx>

Signed-off-by: Mike Snitzer <snitzer@xxxxxxxxxx>
Signed-off-by: Susan LeGendre-McGhee <slegendr@xxxxxxxxxx>
Signed-off-by: Matthew Sakai <msakai@xxxxxxxxxx>
---
 drivers/md/dm-vdo/data-vio.c      |  2 +-
 drivers/md/dm-vdo/dm-vdo-target.c | 10 +++++-----
 drivers/md/dm-vdo/status-codes.c  |  4 ++--
 drivers/md/dm-vdo/status-codes.h  |  2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/md/dm-vdo/data-vio.c b/drivers/md/dm-vdo/data-vio.c
index 711396e7a77d..7d8100f29e13 100644
--- a/drivers/md/dm-vdo/data-vio.c
+++ b/drivers/md/dm-vdo/data-vio.c
@@ -274,7 +274,7 @@ static void acknowledge_data_vio(struct data_vio *data_vio)
 {
 	struct vdo *vdo = vdo_from_data_vio(data_vio);
 	struct bio *bio = data_vio->user_bio;
-	int error = vdo_map_to_system_error(data_vio->vio.completion.result);
+	int error = vdo_status_to_errno(data_vio->vio.completion.result);
 
 	if (bio == NULL)
 		return;
diff --git a/drivers/md/dm-vdo/dm-vdo-target.c b/drivers/md/dm-vdo/dm-vdo-target.c
index fcba50d8d088..e2e60a29e873 100644
--- a/drivers/md/dm-vdo/dm-vdo-target.c
+++ b/drivers/md/dm-vdo/dm-vdo-target.c
@@ -1117,7 +1117,7 @@ static int vdo_message(struct dm_target *ti, unsigned int argc, char **argv,
 		vdo_write_stats(vdo, result_buffer, maxlen);
 		result = 1;
 	} else {
-		result = vdo_map_to_system_error(process_vdo_message(vdo, argc, argv));
+		result = vdo_status_to_errno(process_vdo_message(vdo, argc, argv));
 	}
 
 	uds_unregister_thread_device_id();
@@ -1613,7 +1613,7 @@ static int construct_new_vdo_registered(struct dm_target *ti, unsigned int argc,
 	if (result != VDO_SUCCESS) {
 		release_instance(instance);
 		free_device_config(config);
-		return vdo_map_to_system_error(result);
+		return vdo_status_to_errno(result);
 	}
 
 	return VDO_SUCCESS;
@@ -1852,7 +1852,7 @@ static int prepare_to_modify(struct dm_target *ti, struct device_config *config,
 		if (result != VDO_SUCCESS) {
 			if (result == VDO_PARAMETER_MISMATCH) {
 				/*
-				 * If we don't trap this case, vdo_map_to_system_error() will remap
+				 * If we don't trap this case, vdo_status_to_errno() will remap
 				 * it to -EIO, which is misleading and ahistorical.
 				 */
 				result = -EINVAL;
@@ -1892,7 +1892,7 @@ static int update_existing_vdo(const char *device_name, struct dm_target *ti,
 	result = prepare_to_modify(ti, config, vdo);
 	if (result != VDO_SUCCESS) {
 		free_device_config(config);
-		return vdo_map_to_system_error(result);
+		return vdo_status_to_errno(result);
 	}
 
 	set_device_config(ti, vdo, config);
@@ -2850,7 +2850,7 @@ static int vdo_preresume(struct dm_target *ti)
 	if ((result == VDO_PARAMETER_MISMATCH) || (result == VDO_INVALID_ADMIN_STATE))
 		result = -EINVAL;
 	uds_unregister_thread_device_id();
-	return vdo_map_to_system_error(result);
+	return vdo_status_to_errno(result);
 }
 
 static void vdo_resume(struct dm_target *ti)
diff --git a/drivers/md/dm-vdo/status-codes.c b/drivers/md/dm-vdo/status-codes.c
index 33b1de29b205..b4d7eb7f94ff 100644
--- a/drivers/md/dm-vdo/status-codes.c
+++ b/drivers/md/dm-vdo/status-codes.c
@@ -87,7 +87,7 @@ int vdo_register_status_codes(void)
 }
 
 /**
- * vdo_map_to_system_error() - Given an error code, return a value we can return to the OS.
+ * vdo_status_to_errno() - Given an error code, return a value we can return to the OS.
  * @error: The error code to convert.
  *
  * The input error code may be a system-generated value (such as -EIO), an errno macro used in our
@@ -96,7 +96,7 @@ int vdo_register_status_codes(void)
  *
  * Return: A system error code value.
  */
-int vdo_map_to_system_error(int error)
+int vdo_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/status-codes.h b/drivers/md/dm-vdo/status-codes.h
index 9e0126a83c6b..5d1e8bbe54b4 100644
--- a/drivers/md/dm-vdo/status-codes.h
+++ b/drivers/md/dm-vdo/status-codes.h
@@ -105,6 +105,6 @@ extern const struct error_info vdo_status_list[];
 
 int vdo_register_status_codes(void);
 
-int vdo_map_to_system_error(int error);
+int vdo_status_to_errno(int error);
 
 #endif /* VDO_STATUS_CODES_H */
-- 
2.42.0





[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux