summaryrefslogtreecommitdiff
path: root/drivers/md/dm-vdo/status-codes.h
diff options
context:
space:
mode:
authorMatthew Sakai <msakai@redhat.com>2024-02-28 03:22:59 +0300
committerMike Snitzer <snitzer@kernel.org>2024-03-04 23:07:56 +0300
commitee8f6ec1b16044510a82eb9a3f7059a35d4fb09a (patch)
tree5faba166bb519056b90620746a7754ba5d051f29 /drivers/md/dm-vdo/status-codes.h
parent8f89115efc1e8f34dd3182e2f3f7064225b52762 (diff)
downloadlinux-ee8f6ec1b16044510a82eb9a3f7059a35d4fb09a.tar.xz
dm vdo errors: remove unused error codes
Also define VDO_SUCCESS in a more central location, and rename error block constants for clarity. Signed-off-by: Matthew Sakai <msakai@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md/dm-vdo/status-codes.h')
-rw-r--r--drivers/md/dm-vdo/status-codes.h32
1 files changed, 5 insertions, 27 deletions
diff --git a/drivers/md/dm-vdo/status-codes.h b/drivers/md/dm-vdo/status-codes.h
index 5d1e8bbe54b4..eb847def8eb4 100644
--- a/drivers/md/dm-vdo/status-codes.h
+++ b/drivers/md/dm-vdo/status-codes.h
@@ -9,17 +9,15 @@
#include "errors.h"
enum {
- UDS_BLOCK_SIZE = UDS_ERROR_CODE_BLOCK_END - UDS_ERROR_CODE_BASE,
- VDO_BLOCK_START = UDS_ERROR_CODE_BLOCK_END,
- VDO_BLOCK_END = VDO_BLOCK_START + UDS_BLOCK_SIZE,
+ UDS_ERRORS_BLOCK_SIZE = UDS_ERROR_CODE_BLOCK_END - UDS_ERROR_CODE_BASE,
+ VDO_ERRORS_BLOCK_START = UDS_ERROR_CODE_BLOCK_END,
+ VDO_ERRORS_BLOCK_END = VDO_ERRORS_BLOCK_START + UDS_ERRORS_BLOCK_SIZE,
};
/* VDO-specific status codes. */
enum vdo_status_codes {
- /* successful result */
- VDO_SUCCESS = UDS_SUCCESS,
/* base of all VDO errors */
- VDO_STATUS_CODE_BASE = VDO_BLOCK_START,
+ VDO_STATUS_CODE_BASE = VDO_ERRORS_BLOCK_START,
/* we haven't written this yet */
VDO_NOT_IMPLEMENTED = VDO_STATUS_CODE_BASE,
/* input out of range */
@@ -28,14 +26,8 @@ enum vdo_status_codes {
VDO_REF_COUNT_INVALID,
/* a free block could not be allocated */
VDO_NO_SPACE,
- /* unexpected EOF on block read */
- VDO_UNEXPECTED_EOF,
/* improper or missing configuration option */
VDO_BAD_CONFIGURATION,
- /* socket opening or binding problem */
- VDO_SOCKET_ERROR,
- /* read or write on non-aligned offset */
- VDO_BAD_ALIGNMENT,
/* prior operation still in progress */
VDO_COMPONENT_BUSY,
/* page contents incorrect or corrupt data */
@@ -46,20 +38,14 @@ enum vdo_status_codes {
VDO_INCORRECT_COMPONENT,
/* parameters have conflicting values */
VDO_PARAMETER_MISMATCH,
- /* the block size is too small */
- VDO_BLOCK_SIZE_TOO_SMALL,
/* no partition exists with a given id */
VDO_UNKNOWN_PARTITION,
/* a partition already exists with a given id */
VDO_PARTITION_EXISTS,
- /* the VDO is not in read-only mode */
- VDO_NOT_READ_ONLY,
/* physical block growth of too few blocks */
VDO_INCREMENT_TOO_SMALL,
/* incorrect checksum */
VDO_CHECKSUM_MISMATCH,
- /* the recovery journal is full */
- VDO_RECOVERY_JOURNAL_FULL,
/* a lock is held incorrectly */
VDO_LOCK_ERROR,
/* the VDO is in read-only mode */
@@ -74,16 +60,8 @@ enum vdo_status_codes {
VDO_INVALID_FRAGMENT,
/* action is unsupported while rebuilding */
VDO_RETRY_AFTER_REBUILD,
- /* the extended command is not known */
- VDO_UNKNOWN_COMMAND,
- /* bad extended command parameters */
- VDO_COMMAND_ERROR,
- /* cannot determine sizes to fit */
- VDO_CANNOT_DETERMINE_SIZE,
/* a block map entry is invalid */
VDO_BAD_MAPPING,
- /* read cache has no free slots */
- VDO_READ_CACHE_BUSY,
/* bio_add_page failed */
VDO_BIO_CREATION_FAILED,
/* bad magic number */
@@ -98,7 +76,7 @@ enum vdo_status_codes {
VDO_CANT_ADD_SYSFS_NODE,
/* one more than last error code */
VDO_STATUS_CODE_LAST,
- VDO_STATUS_CODE_BLOCK_END = VDO_BLOCK_END
+ VDO_STATUS_CODE_BLOCK_END = VDO_ERRORS_BLOCK_END
};
extern const struct error_info vdo_status_list[];