summaryrefslogtreecommitdiff
path: root/drivers/md/persistent-data/dm-space-map-metadata.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-03-06 01:32:02 (GMT)
committerDavid S. Miller <davem@davemloft.net>2014-03-06 01:32:02 (GMT)
commit67ddc87f162e2d0e29db2b6b21c5a3fbcb8be206 (patch)
treec83ac73e3d569156d4b7f3dab3e7e27e0054cd0d /drivers/md/persistent-data/dm-space-map-metadata.h
parent6092c79fd00ce48ee8698955ea6419cc5cd65641 (diff)
parentc3bebc71c4bcdafa24b506adf0c1de3c1f77e2e0 (diff)
downloadlinux-67ddc87f162e2d0e29db2b6b21c5a3fbcb8be206.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/wireless/ath/ath9k/recv.c drivers/net/wireless/mwifiex/pcie.c net/ipv6/sit.c The SIT driver conflict consists of a bug fix being done by hand in 'net' (missing u64_stats_init()) whilst in 'net-next' a helper was created (netdev_alloc_pcpu_stats()) which takes care of this. The two wireless conflicts were overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/md/persistent-data/dm-space-map-metadata.h')
-rw-r--r--drivers/md/persistent-data/dm-space-map-metadata.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/md/persistent-data/dm-space-map-metadata.h b/drivers/md/persistent-data/dm-space-map-metadata.h
index 39bba08..64df923 100644
--- a/drivers/md/persistent-data/dm-space-map-metadata.h
+++ b/drivers/md/persistent-data/dm-space-map-metadata.h
@@ -9,6 +9,17 @@
#include "dm-transaction-manager.h"
+#define DM_SM_METADATA_BLOCK_SIZE (4096 >> SECTOR_SHIFT)
+
+/*
+ * The metadata device is currently limited in size.
+ *
+ * We have one block of index, which can hold 255 index entries. Each
+ * index entry contains allocation info about ~16k metadata blocks.
+ */
+#define DM_SM_METADATA_MAX_BLOCKS (255 * ((1 << 14) - 64))
+#define DM_SM_METADATA_MAX_SECTORS (DM_SM_METADATA_MAX_BLOCKS * DM_SM_METADATA_BLOCK_SIZE)
+
/*
* Unfortunately we have to use two-phase construction due to the cycle
* between the tm and sm.