Module Name: src
Committed By: tkusumi
Date: Wed Dec 4 16:55:30 UTC 2019
Modified Files:
src/sys/dev/dm: device-mapper.c dm_pdev.c
Log Message:
dm: Minor fixes/cleanups
To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/dm/device-mapper.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/dm/dm_pdev.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/device-mapper.c
diff -u src/sys/dev/dm/device-mapper.c:1.43 src/sys/dev/dm/device-mapper.c:1.44
--- src/sys/dev/dm/device-mapper.c:1.43 Wed Dec 4 15:31:12 2019
+++ src/sys/dev/dm/device-mapper.c Wed Dec 4 16:55:30 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: device-mapper.c,v 1.43 2019/12/04 15:31:12 tkusumi Exp $ */
+/* $NetBSD: device-mapper.c,v 1.44 2019/12/04 16:55:30 tkusumi Exp $ */
/*
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -616,13 +616,13 @@ dmstrategy(struct buf *bp)
* Find out what tables I want to select.
*/
SLIST_FOREACH(table_en, tbl, next) {
- /* I need need number of bytes not blocks. */
+ /* I need number of bytes not blocks. */
table_start = table_en->start * DEV_BSIZE;
/*
* I have to sub 1 from table_en->length to prevent
* off by one error
*/
- table_end = table_start + (table_en->length)* DEV_BSIZE;
+ table_end = table_start + table_en->length * DEV_BSIZE;
start = MAX(table_start, buf_start);
Index: src/sys/dev/dm/dm_pdev.c
diff -u src/sys/dev/dm/dm_pdev.c:1.14 src/sys/dev/dm/dm_pdev.c:1.15
--- src/sys/dev/dm/dm_pdev.c:1.14 Wed Dec 4 15:31:12 2019
+++ src/sys/dev/dm/dm_pdev.c Wed Dec 4 16:55:30 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: dm_pdev.c,v 1.14 2019/12/04 15:31:12 tkusumi Exp $ */
+/* $NetBSD: dm_pdev.c,v 1.15 2019/12/04 16:55:30 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.14 2019/12/04 15:31:12 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_pdev.c,v 1.15 2019/12/04 16:55:30 tkusumi Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -43,7 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: dm_pdev.c,v
#include "dm.h"
-SLIST_HEAD(dm_pdevs, dm_pdev) dm_pdev_list;
+static SLIST_HEAD(dm_pdevs, dm_pdev) dm_pdev_list;
static kmutex_t dm_pdev_mutex;