summaryrefslogtreecommitdiff
path: root/sys/dev/dm/dm_target_mirror.c
diff options
context:
space:
mode:
authortkusumi <tkusumi@NetBSD.org>2019-12-08 10:50:21 +0000
committertkusumi <tkusumi@NetBSD.org>2019-12-08 10:50:21 +0000
commit56fbfa2849ced55d793eb47f26cb4e9daeb85e81 (patch)
tree1d3a3392517cf71153b9da7a927c26507d0bebb1 /sys/dev/dm/dm_target_mirror.c
parenteb30c1c68293ff0407c40e86c3a19b09d924b622 (diff)
dm: Move targets specific structs to .c files
These don't need to be defined and exposed in dm.h.
Diffstat (limited to 'sys/dev/dm/dm_target_mirror.c')
-rw-r--r--sys/dev/dm/dm_target_mirror.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/dev/dm/dm_target_mirror.c b/sys/dev/dm/dm_target_mirror.c
index 13e444da420..0e67b1775e5 100644
--- a/sys/dev/dm/dm_target_mirror.c
+++ b/sys/dev/dm/dm_target_mirror.c
@@ -1,4 +1,4 @@
-/*$NetBSD: dm_target_mirror.c,v 1.15 2019/12/08 04:41:02 tkusumi Exp $*/
+/*$NetBSD: dm_target_mirror.c,v 1.16 2019/12/08 10:50:21 tkusumi Exp $*/
/*
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dm_target_mirror.c,v 1.15 2019/12/08 04:41:02 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_target_mirror.c,v 1.16 2019/12/08 10:50:21 tkusumi Exp $");
/*
* This file implements initial version of device-mapper mirror target.
@@ -50,6 +50,18 @@ int dm_target_mirror_deps(dm_table_entry_t *, prop_array_t);
int dm_target_mirror_destroy(dm_table_entry_t *);
int dm_target_mirror_upcall(dm_table_entry_t *, struct buf *);
+typedef struct target_mirror_config {
+#define MAX_MIRROR_COPIES 4
+ dm_pdev_t *orig;
+ dm_pdev_t *copies[MAX_MIRROR_COPIES];
+
+ /* copied blocks bitmaps administration etc*/
+ dm_pdev_t *log_pdev; /* for administration */
+ uint64_t log_regionsize; /* blocksize of mirror */
+
+ /* list of parts that still need copied etc.; run length encoded? */
+} dm_target_mirror_config_t;
+
#ifdef DM_TARGET_MODULE
/*
* Every target can be compiled directly to dm driver or as a