summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2018-01-05 14:22:26 +0000
committerchristos <christos@NetBSD.org>2018-01-05 14:22:26 +0000
commit30f3f9afbb6ee7c71dd6daa26feb529f960b2711 (patch)
tree740d6fcd65db70aa3f2fb7a1e199c17c0f404ae0 /sys/dev
parentc4e2c478b3916d5df219d75b5cdc6a3dec1ba0cd (diff)
use some size_t, add whitespace between functions, rcsids.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/dm/dm_dev.c20
-rw-r--r--sys/dev/dm/dm_pdev.c78
-rw-r--r--sys/dev/dm/dm_table.c11
-rw-r--r--sys/dev/dm/dm_target.c18
-rw-r--r--sys/dev/dm/dm_target_error.c10
-rw-r--r--sys/dev/dm/dm_target_mirror.c10
-rw-r--r--sys/dev/dm/dm_target_stripe.c13
-rw-r--r--sys/dev/dm/dm_target_zero.c10
8 files changed, 121 insertions, 49 deletions
diff --git a/sys/dev/dm/dm_dev.c b/sys/dev/dm/dm_dev.c
index 24eceb2ab42..aa90904014e 100644
--- a/sys/dev/dm/dm_dev.c
+++ b/sys/dev/dm/dm_dev.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dm_dev.c,v 1.10 2017/06/01 02:45:09 chs Exp $ */
+/* $NetBSD: dm_dev.c,v 1.11 2018/01/05 14:22:26 christos Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -28,6 +28,8 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* 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 $");
#include <sys/types.h>
#include <sys/param.h>
@@ -61,6 +63,7 @@ disable_dev(dm_dev_t * dmv)
cv_wait(&dmv->dev_cv, &dmv->dev_mtx);
mutex_exit(&dmv->dev_mtx);
}
+
/*
* Generic function used to lookup dm_dev_t. Calling with dm_dev_name
* and dm_dev_uuid NULL is allowed.
@@ -98,7 +101,6 @@ dm_dev_lookup(const char *dm_dev_name, const char *dm_dev_uuid,
return NULL;
}
-
/*
* Lookup device with its minor number.
*/
@@ -114,6 +116,7 @@ dm_dev_lookup_minor(int dm_dev_minor)
return NULL;
}
+
/*
* Lookup device with its device name.
*/
@@ -121,8 +124,8 @@ static dm_dev_t *
dm_dev_lookup_name(const char *dm_dev_name)
{
dm_dev_t *dmv;
- int dlen;
- int slen;
+ size_t dlen;
+ size_t slen;
slen = strlen(dm_dev_name);
@@ -142,6 +145,7 @@ dm_dev_lookup_name(const char *dm_dev_name)
return NULL;
}
+
/*
* Lookup device with its device uuid. Used mostly by LVM2tools.
*/
@@ -168,6 +172,7 @@ dm_dev_lookup_uuid(const char *dm_dev_uuid)
return NULL;
}
+
/*
* Insert new device to the global list of devices.
*/
@@ -194,6 +199,7 @@ dm_dev_insert(dm_dev_t * dev)
mutex_exit(&dm_dev_mutex);
return r;
}
+
#ifdef notyet
/*
* Lookup device with its minor number.
@@ -238,6 +244,7 @@ dm_dev_detach(device_t devt)
return NULL;
}
+
/*
* Remove device selected with dm_dev from global list of devices.
*/
@@ -269,6 +276,7 @@ dm_dev_rem(const char *dm_dev_name, const char *dm_dev_uuid,
return NULL;
}
+
/*
* Destroy all devices created in device-mapper. Remove all tables
* free all allocated memmory.
@@ -310,6 +318,7 @@ dm_dev_destroy(void)
mutex_destroy(&dm_dev_mutex);
return 0;
}
+
/*
* Allocate new device entry.
*/
@@ -322,6 +331,7 @@ dm_dev_alloc(void)
dmv->diskp = kmem_zalloc(sizeof(struct disk), KM_SLEEP);
return dmv;
}
+
/*
* Freed device entry.
*/
@@ -360,6 +370,7 @@ dm_dev_unbusy(dm_dev_t * dmv)
cv_broadcast(&dmv->dev_cv);
mutex_exit(&dmv->dev_mtx);
}
+
/*
* Return prop_array of dm_targer_list dictionaries.
*/
@@ -387,6 +398,7 @@ dm_dev_prop_list(void)
mutex_exit(&dm_dev_mutex);
return dev_array;
}
+
/*
* Initialize global device mutex.
*/
diff --git a/sys/dev/dm/dm_pdev.c b/sys/dev/dm/dm_pdev.c
index b031c4d83c7..f7188b4e103 100644
--- a/sys/dev/dm/dm_pdev.c
+++ b/sys/dev/dm/dm_pdev.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dm_pdev.c,v 1.9 2017/06/01 02:45:09 chs Exp $ */
+/* $NetBSD: dm_pdev.c,v 1.10 2018/01/05 14:22:26 christos Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -28,6 +28,8 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+__KERNEL_RCSID(0, "$NetBSD: dm_pdev.c,v 1.10 2018/01/05 14:22:26 christos Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -44,21 +46,21 @@
SLIST_HEAD(dm_pdevs, dm_pdev) dm_pdev_list;
- kmutex_t dm_pdev_mutex;
+kmutex_t dm_pdev_mutex;
- static dm_pdev_t *dm_pdev_alloc(const char *);
- static int dm_pdev_rem(dm_pdev_t *);
- static dm_pdev_t *dm_pdev_lookup_name(const char *);
+static dm_pdev_t *dm_pdev_alloc(const char *);
+static int dm_pdev_rem(dm_pdev_t *);
+static dm_pdev_t *dm_pdev_lookup_name(const char *);
/*
- * Find used pdev with name == dm_pdev_name.
- */
- dm_pdev_t *
- dm_pdev_lookup_name(const char *dm_pdev_name)
+* Find used pdev with name == dm_pdev_name.
+*/
+dm_pdev_t *
+dm_pdev_lookup_name(const char *dm_pdev_name)
{
dm_pdev_t *dm_pdev;
- int dlen;
- int slen;
+ size_t dlen;
+ size_t slen;
KASSERT(dm_pdev_name != NULL);
@@ -76,6 +78,7 @@ SLIST_HEAD(dm_pdevs, dm_pdev) dm_pdev_list;
return NULL;
}
+
/*
* Create entry for device with name dev_name and open vnode for it.
* If entry already exists in global SLIST I will only increment
@@ -95,7 +98,8 @@ dm_pdev_insert(const char *dev_name)
if (dmp != NULL) {
dmp->ref_cnt++;
- aprint_debug("dmp_pdev_insert pdev %s already in tree\n", dev_name);
+ aprint_debug("%s: pdev %s already in tree\n",
+ __func__, dev_name);
mutex_exit(&dm_pdev_mutex);
return dmp;
}
@@ -106,16 +110,16 @@ dm_pdev_insert(const char *dev_name)
dev_pb = pathbuf_create(dev_name);
if (dev_pb == NULL) {
- aprint_debug("pathbuf_create on device: %s failed!\n",
- dev_name);
+ aprint_debug("%s: pathbuf_create on device: %s failed!\n",
+ __func__, dev_name);
kmem_free(dmp, sizeof(dm_pdev_t));
return NULL;
}
error = dk_lookup(dev_pb, curlwp, &dmp->pdev_vnode);
pathbuf_destroy(dev_pb);
if (error) {
- aprint_debug("dk_lookup on device: %s failed with error %d!\n",
- dev_name, error);
+ aprint_debug("%s: dk_lookup on device: %s (error %d)\n",
+ __func__, dev_name, error);
kmem_free(dmp, sizeof(dm_pdev_t));
return NULL;
}
@@ -128,6 +132,7 @@ dm_pdev_insert(const char *dev_name)
return dmp;
}
+
/*
* Initialize pdev subsystem.
*/
@@ -139,6 +144,7 @@ dm_pdev_init(void)
return 0;
}
+
/*
* Allocat new pdev structure if is not already present and
* set name.
@@ -148,33 +154,33 @@ dm_pdev_alloc(const char *name)
{
dm_pdev_t *dmp;
- dmp = kmem_zalloc(sizeof(dm_pdev_t), KM_SLEEP);
- strlcpy(dmp->name, name, MAX_DEV_NAME);
+ dmp = kmem_zalloc(sizeof(*dmp), KM_SLEEP);
+ strlcpy(dmp->name, name, sizeof(dmp->name));
dmp->ref_cnt = 0;
dmp->pdev_vnode = NULL;
return dmp;
}
+
/*
* Destroy allocated dm_pdev.
*/
static int
dm_pdev_rem(dm_pdev_t * dmp)
{
- int err;
KASSERT(dmp != NULL);
if (dmp->pdev_vnode != NULL) {
- err = vn_close(dmp->pdev_vnode, FREAD | FWRITE, FSCRED);
- if (err != 0)
- return err;
+ int error = vn_close(dmp->pdev_vnode, FREAD | FWRITE, FSCRED);
+ if (error != 0)
+ return error;
}
kmem_free(dmp, sizeof(*dmp));
- dmp = NULL;
return 0;
}
+
/*
* Destroy all existing pdev's in device-mapper.
*/
@@ -197,6 +203,7 @@ dm_pdev_destroy(void)
mutex_destroy(&dm_pdev_mutex);
return 0;
}
+
/*
* This funcion is called from dm_dev_remove_ioctl.
* When I'm removing device from list, I have to decrement
@@ -227,18 +234,21 @@ dm_pdev_decr(dm_pdev_t * dmp)
mutex_exit(&dm_pdev_mutex);
return 0;
}
-/*static int
- dm_pdev_dump_list(void)
- {
- dm_pdev_t *dmp;
+
+#if 0
+static int
+dm_pdev_dump_list(void)
+{
+ dm_pdev_t *dmp;
- aprint_verbose("Dumping dm_pdev_list \n");
+ aprint_verbose("Dumping dm_pdev_list\n");
- SLIST_FOREACH(dmp, &dm_pdev_list, next_pdev) {
- aprint_verbose("dm_pdev_name %s ref_cnt %d list_rf_cnt %d\n",
- dmp->name, dmp->ref_cnt, dmp->list_ref_cnt);
- }
+ SLIST_FOREACH(dmp, &dm_pdev_list, next_pdev) {
+ aprint_verbose("dm_pdev_name %s ref_cnt %d list_rf_cnt %d\n",
+ dmp->name, dmp->ref_cnt, dmp->list_ref_cnt);
+ }
- return 0;
+ return 0;
- }*/
+}
+#endif
diff --git a/sys/dev/dm/dm_table.c b/sys/dev/dm/dm_table.c
index c298e3176c2..42db37b79d7 100644
--- a/sys/dev/dm/dm_table.c
+++ b/sys/dev/dm/dm_table.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dm_table.c,v 1.7 2011/08/27 17:10:05 ahoka Exp $ */
+/* $NetBSD: dm_table.c,v 1.8 2018/01/05 14:22:26 christos Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -28,6 +28,8 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+__KERNEL_RCSID(0, "$NetBSD: dm_table.c,v 1.8 2018/01/05 14:22:26 christos Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -79,6 +81,7 @@ dm_table_busy(dm_table_head_t * head, uint8_t table_id)
mutex_exit(&head->table_mtx);
return id;
}
+
/*
* Function release table lock and eventually wakeup all waiters.
*/
@@ -94,6 +97,7 @@ dm_table_unbusy(dm_table_head_t * head)
mutex_exit(&head->table_mtx);
}
+
/*
* Return current active table to caller, increment io_cnt reference counter.
*/
@@ -114,6 +118,7 @@ dm_table_release(dm_table_head_t * head, uint8_t table_id)
{
dm_table_unbusy(head);
}
+
/*
* Switch table from inactive to active mode. Have to wait until io_cnt is 0.
*/
@@ -129,6 +134,7 @@ dm_table_switch_tables(dm_table_head_t * head)
mutex_exit(&head->table_mtx);
}
+
/*
* Destroy all table data. This function can run when there are no
* readers on table lists.
@@ -173,6 +179,7 @@ dm_table_destroy(dm_table_head_t * head, uint8_t table_id)
return 0;
}
+
/*
* Return length of active table in device.
*/
@@ -256,6 +263,7 @@ dm_table_disksize(dm_table_head_t * head, uint64_t *numsecp, unsigned *secsizep)
dm_table_unbusy(head);
}
+
/*
* Return > 0 if table is at least one table entry (returns number of entries)
* and return 0 if there is not. Target count returned from this function
@@ -302,6 +310,7 @@ dm_table_head_init(dm_table_head_t * head)
mutex_init(&head->table_mtx, MUTEX_DEFAULT, IPL_NONE);
cv_init(&head->table_cv, "dm_io");
}
+
/*
* Destroy all variables in table_head
*/
diff --git a/sys/dev/dm/dm_target.c b/sys/dev/dm/dm_target.c
index dc0937332bd..4aa0cfaf3fa 100644
--- a/sys/dev/dm/dm_target.c
+++ b/sys/dev/dm/dm_target.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dm_target.c,v 1.19 2014/10/18 08:33:27 snj Exp $ */
+/* $NetBSD: dm_target.c,v 1.20 2018/01/05 14:22:26 christos Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -28,6 +28,8 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* 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 $");
#include <sys/types.h>
#include <sys/param.h>
@@ -56,6 +58,7 @@ dm_target_busy(dm_target_t * target)
{
atomic_inc_32(&target->ref_cnt);
}
+
/*
* Release reference counter on target.
*/
@@ -65,6 +68,7 @@ dm_target_unbusy(dm_target_t * target)
KASSERT(target->ref_cnt > 0);
atomic_dec_32(&target->ref_cnt);
}
+
/*
* Try to autoload target module if it was not found in current
* target list.
@@ -94,6 +98,7 @@ dm_target_autoload(const char *dm_target_name)
return dmt;
}
+
/*
* Lookup for target in global target list.
*/
@@ -117,6 +122,7 @@ dm_target_lookup(const char *dm_target_name)
return dmt;
}
+
/*
* Search for name in TAIL and return apropriate pointer.
*/
@@ -124,8 +130,8 @@ static dm_target_t *
dm_target_lookup_name(const char *dm_target_name)
{
dm_target_t *dm_target;
- int dlen;
- int slen;
+ size_t dlen;
+ size_t slen;
slen = strlen(dm_target_name) + 1;
@@ -140,6 +146,7 @@ dm_target_lookup_name(const char *dm_target_name)
return NULL;
}
+
/*
* Insert new target struct into the TAIL.
* dm_target
@@ -174,7 +181,6 @@ dm_target_insert(dm_target_t * dm_target)
return 0;
}
-
/*
* Remove target from TAIL, target is selected with its name.
*/
@@ -205,6 +211,7 @@ dm_target_rem(char *dm_target_name)
return 0;
}
+
/*
* Destroy all targets and remove them from queue.
* This routine is called from dm_detach, before module
@@ -231,6 +238,7 @@ dm_target_destroy(void)
return 0;
}
+
/*
* Allocate new target entry.
*/
@@ -239,6 +247,7 @@ dm_target_alloc(const char *name)
{
return kmem_zalloc(sizeof(dm_target_t), KM_SLEEP);
}
+
/*
* Return prop_array of dm_target dictionaries.
*/
@@ -276,6 +285,7 @@ dm_target_prop_list(void)
return target_array;
}
+
/* Initialize dm_target subsystem. */
int
dm_target_init(void)
diff --git a/sys/dev/dm/dm_target_error.c b/sys/dev/dm/dm_target_error.c
index b539c259e10..c40b6443d4b 100644
--- a/sys/dev/dm/dm_target_error.c
+++ b/sys/dev/dm/dm_target_error.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dm_target_error.c,v 1.11 2010/05/18 15:10:38 haad Exp $ */
+/* $NetBSD: dm_target_error.c,v 1.12 2018/01/05 14:22:26 christos Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -28,6 +28,8 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+__KERNEL_RCSID(0, "$NetBSD: dm_target_error.c,v 1.12 2018/01/05 14:22:26 christos Exp $");
/*
* This file implements initial version of device-mapper error target.
@@ -120,12 +122,14 @@ dm_target_error_init(dm_dev_t * dmv, void **target_config, char *argv)
return 0;
}
+
/* Status routine called to get params string. */
char *
dm_target_error_status(void *target_config)
{
return NULL;
}
+
/* Strategy routine called from dm_strategy. */
int
dm_target_error_strategy(dm_table_entry_t * table_en, struct buf * bp)
@@ -140,6 +144,7 @@ dm_target_error_strategy(dm_table_entry_t * table_en, struct buf * bp)
return 0;
}
+
/* Sync underlying disk caches. */
int
dm_target_error_sync(dm_table_entry_t * table_en)
@@ -147,6 +152,7 @@ dm_target_error_sync(dm_table_entry_t * table_en)
return 0;
}
+
/* Doesn't do anything here. */
int
dm_target_error_destroy(dm_table_entry_t * table_en)
@@ -158,12 +164,14 @@ dm_target_error_destroy(dm_table_entry_t * table_en)
return 0;
}
+
/* Doesn't not need to do anything here. */
int
dm_target_error_deps(dm_table_entry_t * table_en, prop_array_t prop_array)
{
return 0;
}
+
/* Unsupported for this target. */
int
dm_target_error_upcall(dm_table_entry_t * table_en, struct buf * bp)
diff --git a/sys/dev/dm/dm_target_mirror.c b/sys/dev/dm/dm_target_mirror.c
index 96e9186aacd..8087884faa1 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.9 2010/05/18 15:10:38 haad Exp $*/
+/*$NetBSD: dm_target_mirror.c,v 1.10 2018/01/05 14:22:26 christos Exp $*/
/*
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,6 +28,8 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+__KERNEL_RCSID(0, "$NetBSD: dm_target_mirror.c,v 1.10 2018/01/05 14:22:26 christos Exp $");
/*
* This file implements initial version of device-mapper mirror target.
@@ -124,12 +126,14 @@ dm_target_mirror_init(dm_dev_t * dmv, void **target_config, char *argv)
return ENOSYS;
}
+
/* Status routine called to get params string. */
char *
dm_target_mirror_status(void *target_config)
{
return NULL;
}
+
/* Strategy routine called from dm_strategy. */
int
dm_target_mirror_strategy(dm_table_entry_t * table_en, struct buf * bp)
@@ -144,6 +148,7 @@ dm_target_mirror_strategy(dm_table_entry_t * table_en, struct buf * bp)
return 0;
}
+
/* Sync underlying disk caches. */
int
dm_target_mirror_sync(dm_table_entry_t * table_en)
@@ -151,6 +156,7 @@ dm_target_mirror_sync(dm_table_entry_t * table_en)
return 0;
}
+
/* Doesn't do anything here. */
int
dm_target_mirror_destroy(dm_table_entry_t * table_en)
@@ -162,12 +168,14 @@ dm_target_mirror_destroy(dm_table_entry_t * table_en)
return 0;
}
+
/* Doesn't not need to do anything here. */
int
dm_target_mirror_deps(dm_table_entry_t * table_en, prop_array_t prop_array)
{
return 0;
}
+
/* Unsupported for this target. */
int
dm_target_mirror_upcall(dm_table_entry_t * table_en, struct buf * bp)
diff --git a/sys/dev/dm/dm_target_stripe.c b/sys/dev/dm/dm_target_stripe.c
index e2d52ed19e1..a7d78379ac5 100644
--- a/sys/dev/dm/dm_target_stripe.c
+++ b/sys/dev/dm/dm_target_stripe.c
@@ -1,4 +1,4 @@
-/*$NetBSD: dm_target_stripe.c,v 1.22 2017/06/01 02:45:09 chs Exp $*/
+/*$NetBSD: dm_target_stripe.c,v 1.23 2018/01/05 14:22:26 christos Exp $*/
/*
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,6 +28,8 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+__KERNEL_RCSID(0, "$NetBSD: dm_target_stripe.c,v 1.23 2018/01/05 14:22:26 christos Exp $");
/*
* This file implements initial version of device-mapper stripe target.
@@ -190,6 +192,7 @@ dm_target_stripe_init(dm_dev_t * dmv, void **target_config, char *params)
return 0;
}
+
/* Status routine called to get params string. */
char *
dm_target_stripe_status(void *target_config)
@@ -216,6 +219,7 @@ dm_target_stripe_status(void *target_config)
return params;
}
+
/* Strategy routine called from dm_strategy. */
int
dm_target_stripe_strategy(dm_table_entry_t * table_en, struct buf * bp)
@@ -281,6 +285,7 @@ dm_target_stripe_strategy(dm_table_entry_t * table_en, struct buf * bp)
return 0;
}
+
/* Sync underlying disk caches. */
int
dm_target_stripe_sync(dm_table_entry_t * table_en)
@@ -303,18 +308,20 @@ dm_target_stripe_sync(dm_table_entry_t * table_en)
return err;
}
+
/* Destroy target specific data. */
int
dm_target_stripe_destroy(dm_table_entry_t * table_en)
{
dm_target_stripe_fini(table_en->target_config);
+ table_en->target_config = NULL;
/* Unbusy target so we can unload it */
dm_target_unbusy(table_en->target);
- table_en->target_config = NULL;
return 0;
}
+
/* Doesn't not need to do anything here. */
int
dm_target_stripe_deps(dm_table_entry_t * table_en, prop_array_t prop_array)
@@ -334,12 +341,14 @@ dm_target_stripe_deps(dm_table_entry_t * table_en, prop_array_t prop_array)
return 0;
}
+
/* Unsupported for this target. */
int
dm_target_stripe_upcall(dm_table_entry_t * table_en, struct buf * bp)
{
return 0;
}
+
/*
* Compute physical block size
* For a stripe target we chose the maximum sector size of all
diff --git a/sys/dev/dm/dm_target_zero.c b/sys/dev/dm/dm_target_zero.c
index 77d3448ccc7..2861fc0bf61 100644
--- a/sys/dev/dm/dm_target_zero.c
+++ b/sys/dev/dm/dm_target_zero.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dm_target_zero.c,v 1.12 2011/12/11 22:53:26 agc Exp $ */
+/* $NetBSD: dm_target_zero.c,v 1.13 2018/01/05 14:22:26 christos Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -28,7 +28,8 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-
+#include <sys/cdefs.h>
+__KERNEL_RCSID(0, "$NetBSD: dm_target_zero.c,v 1.13 2018/01/05 14:22:26 christos Exp $");
/*
* This file implements initial version of device-mapper zero target.
@@ -124,6 +125,7 @@ dm_target_zero_init(dm_dev_t * dmv, void **target_config, char *argv)
return 0;
}
+
/* Status routine called to get params string. */
char *
dm_target_zero_status(void *target_config)
@@ -149,6 +151,7 @@ dm_target_zero_strategy(dm_table_entry_t * table_en, struct buf * bp)
return 0;
}
+
/* Sync underlying disk caches. */
int
dm_target_zero_sync(dm_table_entry_t * table_en)
@@ -156,6 +159,7 @@ dm_target_zero_sync(dm_table_entry_t * table_en)
return 0;
}
+
/* Does not need to do anything here. */
int
dm_target_zero_destroy(dm_table_entry_t * table_en)
@@ -167,12 +171,14 @@ dm_target_zero_destroy(dm_table_entry_t * table_en)
return 0;
}
+
/* Does not need to do anything here. */
int
dm_target_zero_deps(dm_table_entry_t * table_en, prop_array_t prop_array)
{
return 0;
}
+
/* Unsuported for this target. */
int
dm_target_zero_upcall(dm_table_entry_t * table_en, struct buf * bp)