drm/rockchip: Don't change hdmi reference clock rate
[drm/drm-misc.git] / drivers / md / dm-vdo / constants.h
bloba8c4d6e24b38a31f578634947cb9a87c2ea0af1a
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright 2023 Red Hat
4 */
6 #ifndef VDO_CONSTANTS_H
7 #define VDO_CONSTANTS_H
9 #include <linux/blkdev.h>
11 #include "types.h"
13 enum {
15 * The maximum number of contiguous PBNs which will go to a single bio submission queue,
16 * assuming there is more than one queue.
18 VDO_BIO_ROTATION_INTERVAL_LIMIT = 1024,
20 /* The number of entries on a block map page */
21 VDO_BLOCK_MAP_ENTRIES_PER_PAGE = 812,
23 /* The origin of the flat portion of the block map */
24 VDO_BLOCK_MAP_FLAT_PAGE_ORIGIN = 1,
27 * The height of a block map tree. Assuming a root count of 60 and 812 entries per page,
28 * this is big enough to represent almost 95 PB of logical space.
30 VDO_BLOCK_MAP_TREE_HEIGHT = 5,
32 /* The default number of bio submission queues. */
33 DEFAULT_VDO_BIO_SUBMIT_QUEUE_COUNT = 4,
35 /* The number of contiguous PBNs to be submitted to a single bio queue. */
36 DEFAULT_VDO_BIO_SUBMIT_QUEUE_ROTATE_INTERVAL = 64,
38 /* The number of trees in the arboreal block map */
39 DEFAULT_VDO_BLOCK_MAP_TREE_ROOT_COUNT = 60,
41 /* The default size of the recovery journal, in blocks */
42 DEFAULT_VDO_RECOVERY_JOURNAL_SIZE = 32 * 1024,
44 /* The default size of each slab journal, in blocks */
45 DEFAULT_VDO_SLAB_JOURNAL_SIZE = 224,
47 /* Unit test minimum */
48 MINIMUM_VDO_SLAB_JOURNAL_BLOCKS = 2,
51 * The initial size of lbn_operations and pbn_operations, which is based upon the expected
52 * maximum number of outstanding VIOs. This value was chosen to make it highly unlikely
53 * that the maps would need to be resized.
55 VDO_LOCK_MAP_CAPACITY = 10000,
57 /* The maximum number of logical zones */
58 MAX_VDO_LOGICAL_ZONES = 60,
60 /* The maximum number of physical zones */
61 MAX_VDO_PHYSICAL_ZONES = 16,
63 /* The base-2 logarithm of the maximum blocks in one slab */
64 MAX_VDO_SLAB_BITS = 23,
66 /* The maximum number of slabs the slab depot supports */
67 MAX_VDO_SLABS = 8192,
70 * The maximum number of block map pages to load simultaneously during recovery or rebuild.
72 MAXIMUM_SIMULTANEOUS_VDO_BLOCK_MAP_RESTORATION_READS = 1024,
74 /* The maximum number of entries in the slab summary */
75 MAXIMUM_VDO_SLAB_SUMMARY_ENTRIES = MAX_VDO_SLABS * MAX_VDO_PHYSICAL_ZONES,
77 /* The maximum number of total threads in a VDO thread configuration. */
78 MAXIMUM_VDO_THREADS = 100,
80 /* The maximum number of VIOs in the system at once */
81 MAXIMUM_VDO_USER_VIOS = 2048,
83 /* The only physical block size supported by VDO */
84 VDO_BLOCK_SIZE = 4096,
86 /* The number of sectors per block */
87 VDO_SECTORS_PER_BLOCK = (VDO_BLOCK_SIZE >> SECTOR_SHIFT),
89 /* The size of a sector that will not be torn */
90 VDO_SECTOR_SIZE = 512,
92 /* The physical block number reserved for storing the zero block */
93 VDO_ZERO_BLOCK = 0,
96 #endif /* VDO_CONSTANTS_H */