diff options
author | Susan LeGendre-McGhee <slegendr@redhat.com> | 2024-02-05 21:04:22 -0500 |
---|---|---|
committer | Mike Snitzer <snitzer@kernel.org> | 2024-02-20 13:43:18 -0500 |
commit | b196d6bd30c39548436cbc7cfd40efcf4f006dfa (patch) | |
tree | 8e9c486299212f669ecf4bc7f7c59458b19f7fac /drivers/md | |
parent | ea9ca07affd80668b207703919eaba849654e11f (diff) | |
download | linux-b196d6bd30c39548436cbc7cfd40efcf4f006dfa.tar.gz |
dm vdo: move encoding constants to encodings.c
Signed-off-by: Susan LeGendre-McGhee <slegendr@redhat.com>
Signed-off-by: Matthew Sakai <msakai@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-vdo/constants.h | 12 | ||||
-rw-r--r-- | drivers/md/dm-vdo/encodings.c | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/drivers/md/dm-vdo/constants.h b/drivers/md/dm-vdo/constants.h index 3a997dd7d0b12..24237bc29f873 100644 --- a/drivers/md/dm-vdo/constants.h +++ b/drivers/md/dm-vdo/constants.h @@ -44,6 +44,9 @@ enum { /** The default size of each slab journal, in blocks */ DEFAULT_VDO_SLAB_JOURNAL_SIZE = 224, + /** Unit test minimum */ + MINIMUM_VDO_SLAB_JOURNAL_BLOCKS = 2, + /* * The initial size of lbn_operations and pbn_operations, which is based upon the expected * maximum number of outstanding VIOs. This value was chosen to make it highly unlikely @@ -90,13 +93,4 @@ enum { VDO_ZERO_BLOCK = 0, }; -/** The maximum logical space is 4 petabytes, which is 1 terablock. */ -static const block_count_t MAXIMUM_VDO_LOGICAL_BLOCKS = 1024ULL * 1024 * 1024 * 1024; - -/** The maximum physical space is 256 terabytes, which is 64 gigablocks. */ -static const block_count_t MAXIMUM_VDO_PHYSICAL_BLOCKS = 1024ULL * 1024 * 1024 * 64; - -/** unit test minimum */ -static const block_count_t MINIMUM_VDO_SLAB_JOURNAL_BLOCKS = 2; - #endif /* VDO_CONSTANTS_H */ diff --git a/drivers/md/dm-vdo/encodings.c b/drivers/md/dm-vdo/encodings.c index 6b3e9a5b3a91f..9e45411fe816e 100644 --- a/drivers/md/dm-vdo/encodings.c +++ b/drivers/md/dm-vdo/encodings.c @@ -15,6 +15,12 @@ #include "status-codes.h" #include "types.h" +/** The maximum logical space is 4 petabytes, which is 1 terablock. */ +static const block_count_t MAXIMUM_VDO_LOGICAL_BLOCKS = 1024ULL * 1024 * 1024 * 1024; + +/** The maximum physical space is 256 terabytes, which is 64 gigablocks. */ +static const block_count_t MAXIMUM_VDO_PHYSICAL_BLOCKS = 1024ULL * 1024 * 1024 * 64; + struct geometry_block { char magic_number[VDO_GEOMETRY_MAGIC_NUMBER_SIZE]; struct packed_header header; |