Module Name: src
Committed By: tkusumi
Date: Tue Dec 3 16:22:01 UTC 2019
Modified Files:
src/sys/dev/dm: dm_dev.c dm_pdev.c dm_target.c
Log Message:
dm: Make global dm locks static
These are all per-file locks which protect dev/pdev/target structure.
taken-from: DragonFlyBSD
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/dm/dm_dev.c
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/dm/dm_pdev.c
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/dm/dm_target.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/dm/dm_dev.c
diff -u src/sys/dev/dm/dm_dev.c:1.11 src/sys/dev/dm/dm_dev.c:1.12
--- src/sys/dev/dm/dm_dev.c:1.11 Fri Jan 5 14:22:26 2018
+++ src/sys/dev/dm/dm_dev.c Tue Dec 3 16:22:01 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: dm_dev.c,v 1.11 2018/01/05 14:22:26 christos Exp $ */
+/* $NetBSD: dm_dev.c,v 1.12 2019/12/03 16:22:01 tkusumi Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dm_dev.c,v 1.11 2018/01/05 14:22:26 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_dev.c,v 1.12 2019/12/03 16:22:01 tkusumi Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -50,7 +50,7 @@ static dm_dev_t *dm_dev_lookup_minor(int
static struct dm_dev_head dm_dev_list =
TAILQ_HEAD_INITIALIZER(dm_dev_list);
-kmutex_t dm_dev_mutex;
+static kmutex_t dm_dev_mutex;
/* dm_dev_mutex must be holdby caller before using disable_dev. */
__inline static void
Index: src/sys/dev/dm/dm_pdev.c
diff -u src/sys/dev/dm/dm_pdev.c:1.12 src/sys/dev/dm/dm_pdev.c:1.13
--- src/sys/dev/dm/dm_pdev.c:1.12 Tue Dec 3 15:47:38 2019
+++ src/sys/dev/dm/dm_pdev.c Tue Dec 3 16:22:01 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: dm_pdev.c,v 1.12 2019/12/03 15:47:38 tkusumi Exp $ */
+/* $NetBSD: dm_pdev.c,v 1.13 2019/12/03 16:22:01 tkusumi Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dm_pdev.c,v 1.12 2019/12/03 15:47:38 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_pdev.c,v 1.13 2019/12/03 16:22:01 tkusumi Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -45,7 +45,7 @@ __KERNEL_RCSID(0, "$NetBSD: dm_pdev.c,v
SLIST_HEAD(dm_pdevs, dm_pdev) dm_pdev_list;
-kmutex_t dm_pdev_mutex;
+static kmutex_t dm_pdev_mutex;
static dm_pdev_t *dm_pdev_alloc(const char *);
static int dm_pdev_rem(dm_pdev_t *);
Index: src/sys/dev/dm/dm_target.c
diff -u src/sys/dev/dm/dm_target.c:1.20 src/sys/dev/dm/dm_target.c:1.21
--- src/sys/dev/dm/dm_target.c:1.20 Fri Jan 5 14:22:26 2018
+++ src/sys/dev/dm/dm_target.c Tue Dec 3 16:22:01 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: dm_target.c,v 1.20 2018/01/05 14:22:26 christos Exp $ */
+/* $NetBSD: dm_target.c,v 1.21 2019/12/03 16:22:01 tkusumi Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dm_target.c,v 1.20 2018/01/05 14:22:26 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_target.c,v 1.21 2019/12/03 16:22:01 tkusumi Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -48,7 +48,7 @@ TAILQ_HEAD(dm_target_head, dm_target);
static struct dm_target_head dm_target_list =
TAILQ_HEAD_INITIALIZER(dm_target_list);
-kmutex_t dm_target_mutex;
+static kmutex_t dm_target_mutex;
/*
* Called indirectly from dm_table_load_ioctl to mark target as used.