Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/dm dm: Rename targets' ->status() to ->table() given...



details:   https://anonhg.NetBSD.org/src/rev/91f436ff50aa
branches:  trunk
changeset: 847222:91f436ff50aa
user:      tkusumi <tkusumi%NetBSD.org@localhost>
date:      Sun Dec 15 05:56:02 2019 +0000

description:
dm: Rename targets' ->status() to ->table() given ->info() exists

Since now that dm targets in NetBSD have ->info() for "status",
->status() should be renamed to ->table() for "table",
given how dm target status was originally designed in Linux kernel.

taken-from: DragonFlyBSD

diffstat:

 sys/dev/dm/dm.h                 |  10 +++++-----
 sys/dev/dm/dm_ioctl.c           |   6 +++---
 sys/dev/dm/dm_target.c          |  12 ++++++------
 sys/dev/dm/dm_target_error.c    |  12 ++++++------
 sys/dev/dm/dm_target_linear.c   |  10 +++++-----
 sys/dev/dm/dm_target_mirror.c   |  12 ++++++------
 sys/dev/dm/dm_target_snapshot.c |  24 ++++++++++++------------
 sys/dev/dm/dm_target_stripe.c   |  10 +++++-----
 sys/dev/dm/dm_target_zero.c     |  12 ++++++------
 9 files changed, 54 insertions(+), 54 deletions(-)

diffs (truncated from 441 to 300 lines):

diff -r 4dd8fbaad75d -r 91f436ff50aa sys/dev/dm/dm.h
--- a/sys/dev/dm/dm.h   Sun Dec 15 04:50:28 2019 +0000
+++ b/sys/dev/dm/dm.h   Sun Dec 15 05:56:02 2019 +0000
@@ -1,4 +1,4 @@
-/*        $NetBSD: dm.h,v 1.41 2019/12/14 17:15:54 tkusumi Exp $      */
+/*        $NetBSD: dm.h,v 1.42 2019/12/15 05:56:02 tkusumi Exp $      */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -184,12 +184,12 @@
 
        int (*deps) (dm_table_entry_t *, prop_array_t);
        /*
-        * Info/status routine are called to get params string, which is target
+        * Info/table routine are called to get params string, which is target
         * specific. When dm_table_status_ioctl is called with flag
         * DM_STATUS_TABLE_FLAG I have to sent params string back.
         */
        char *(*info)(void *);
-       char * (*status)(void *);
+       char *(*table)(void *);
        int (*strategy)(dm_table_entry_t *, struct buf *);
        int (*sync)(dm_table_entry_t *);
        int (*upcall)(dm_table_entry_t *, struct buf *);
@@ -242,7 +242,7 @@
 
 /* dm_target_linear.c */
 int dm_target_linear_init(dm_table_entry_t *, int, char **);
-char *dm_target_linear_status(void *);
+char *dm_target_linear_table(void *);
 int dm_target_linear_strategy(dm_table_entry_t *, struct buf *);
 int dm_target_linear_sync(dm_table_entry_t *);
 int dm_target_linear_deps(dm_table_entry_t *, prop_array_t);
@@ -255,7 +255,7 @@
 
 /* dm_target_stripe.c */
 int dm_target_stripe_init(dm_table_entry_t *, int, char **);
-char *dm_target_stripe_status(void *);
+char *dm_target_stripe_table(void *);
 int dm_target_stripe_strategy(dm_table_entry_t *, struct buf *);
 int dm_target_stripe_sync(dm_table_entry_t *);
 int dm_target_stripe_deps(dm_table_entry_t *, prop_array_t);
diff -r 4dd8fbaad75d -r 91f436ff50aa sys/dev/dm/dm_ioctl.c
--- a/sys/dev/dm/dm_ioctl.c     Sun Dec 15 04:50:28 2019 +0000
+++ b/sys/dev/dm/dm_ioctl.c     Sun Dec 15 05:56:02 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dm_ioctl.c,v 1.44 2019/12/14 17:15:54 tkusumi Exp $      */
+/* $NetBSD: dm_ioctl.c,v 1.45 2019/12/15 05:56:02 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_ioctl.c,v 1.44 2019/12/14 17:15:54 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_ioctl.c,v 1.45 2019/12/15 05:56:02 tkusumi Exp $");
 
 /*
  * Locking is used to synchronise between ioctl calls and between dm_table's
@@ -943,7 +943,7 @@
                prop_dictionary_set_cstring(target_dict, DM_TABLE_PARAMS, "");
 
                if (flags & DM_STATUS_TABLE_FLAG)
-                       params = table_en->target->status(
+                       params = table_en->target->table(
                            table_en->target_config);
                else if (table_en->target->info)
                        params = table_en->target->info(
diff -r 4dd8fbaad75d -r 91f436ff50aa sys/dev/dm/dm_target.c
--- a/sys/dev/dm/dm_target.c    Sun Dec 15 04:50:28 2019 +0000
+++ b/sys/dev/dm/dm_target.c    Sun Dec 15 05:56:02 2019 +0000
@@ -1,4 +1,4 @@
-/*        $NetBSD: dm_target.c,v 1.28 2019/12/14 10:49:30 tkusumi Exp $      */
+/*        $NetBSD: dm_target.c,v 1.29 2019/12/15 05:56:02 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.28 2019/12/14 10:49:30 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_target.c,v 1.29 2019/12/15 05:56:02 tkusumi Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -160,8 +160,8 @@
                printf("%s missing init\n", dm_target->name);
                return EINVAL;
        }
-       if (dm_target->status == NULL) {
-               printf("%s missing status\n", dm_target->name);
+       if (dm_target->table == NULL) {
+               printf("%s missing table\n", dm_target->name);
                return EINVAL;
        }
        if (dm_target->strategy == NULL) {
@@ -331,7 +331,7 @@
        dmt->version[1] = 0;
        dmt->version[2] = 2;
        dmt->init = &dm_target_linear_init;
-       dmt->status = &dm_target_linear_status;
+       dmt->table = &dm_target_linear_table;
        dmt->strategy = &dm_target_linear_strategy;
        dmt->sync = &dm_target_linear_sync;
        dmt->deps = &dm_target_linear_deps;
@@ -345,7 +345,7 @@
        dmt3->version[1] = 0;
        dmt3->version[2] = 3;
        dmt3->init = &dm_target_stripe_init;
-       dmt3->status = &dm_target_stripe_status;
+       dmt3->table = &dm_target_stripe_table;
        dmt3->strategy = &dm_target_stripe_strategy;
        dmt3->sync = &dm_target_stripe_sync;
        dmt3->deps = &dm_target_stripe_deps;
diff -r 4dd8fbaad75d -r 91f436ff50aa sys/dev/dm/dm_target_error.c
--- a/sys/dev/dm/dm_target_error.c      Sun Dec 15 04:50:28 2019 +0000
+++ b/sys/dev/dm/dm_target_error.c      Sun Dec 15 05:56:02 2019 +0000
@@ -1,4 +1,4 @@
-/*        $NetBSD: dm_target_error.c,v 1.20 2019/12/14 10:02:35 tkusumi Exp $      */
+/*        $NetBSD: dm_target_error.c,v 1.21 2019/12/15 05:56:02 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_error.c,v 1.20 2019/12/14 10:02:35 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_target_error.c,v 1.21 2019/12/15 05:56:02 tkusumi Exp $");
 
 /*
  * This file implements initial version of device-mapper error target.
@@ -43,7 +43,7 @@
 
 /* dm_target_error.c */
 int dm_target_error_init(dm_table_entry_t*, int, char **);
-char *dm_target_error_status(void *);
+char *dm_target_error_table(void *);
 int dm_target_error_strategy(dm_table_entry_t *, struct buf *);
 int dm_target_error_sync(dm_table_entry_t *);
 int dm_target_error_deps(dm_table_entry_t *, prop_array_t);
@@ -82,7 +82,7 @@
                dmt->version[1] = 0;
                dmt->version[2] = 0;
                dmt->init = &dm_target_error_init;
-               dmt->status = &dm_target_error_status;
+               dmt->table = &dm_target_error_table;
                dmt->strategy = &dm_target_error_strategy;
                dmt->sync = &dm_target_error_sync;
                dmt->deps = &dm_target_error_deps;
@@ -121,9 +121,9 @@
        return 0;
 }
 
-/* Status routine called to get params string. */
+/* Table routine called to get params string. */
 char *
-dm_target_error_status(void *target_config)
+dm_target_error_table(void *target_config)
 {
        return NULL;
 }
diff -r 4dd8fbaad75d -r 91f436ff50aa sys/dev/dm/dm_target_linear.c
--- a/sys/dev/dm/dm_target_linear.c     Sun Dec 15 04:50:28 2019 +0000
+++ b/sys/dev/dm/dm_target_linear.c     Sun Dec 15 05:56:02 2019 +0000
@@ -1,4 +1,4 @@
-/*        $NetBSD: dm_target_linear.c,v 1.28 2019/12/14 10:02:35 tkusumi Exp $      */
+/*        $NetBSD: dm_target_linear.c,v 1.29 2019/12/15 05:56:02 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_linear.c,v 1.28 2019/12/14 10:02:35 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_target_linear.c,v 1.29 2019/12/15 05:56:02 tkusumi Exp $");
 
 /*
  * This file implements initial version of device-mapper dklinear target.
@@ -84,18 +84,18 @@
 }
 
 /*
- * Status routine is called to get params string, which is target
+ * Table routine is called to get params string, which is target
  * specific. When dm_table_status_ioctl is called with flag
  * DM_STATUS_TABLE_FLAG I have to sent params string back.
  */
 char *
-dm_target_linear_status(void *target_config)
+dm_target_linear_table(void *target_config)
 {
        dm_target_linear_config_t *tlc;
        char *params;
        tlc = target_config;
 
-       aprint_debug("Linear target status function called\n");
+       aprint_debug("Linear target table function called\n");
 
        params = kmem_alloc(DM_MAX_PARAMS_SIZE, KM_SLEEP);
        snprintf(params, DM_MAX_PARAMS_SIZE, "%s %" PRIu64,
diff -r 4dd8fbaad75d -r 91f436ff50aa sys/dev/dm/dm_target_mirror.c
--- a/sys/dev/dm/dm_target_mirror.c     Sun Dec 15 04:50:28 2019 +0000
+++ b/sys/dev/dm/dm_target_mirror.c     Sun Dec 15 05:56:02 2019 +0000
@@ -1,4 +1,4 @@
-/*$NetBSD: dm_target_mirror.c,v 1.19 2019/12/14 10:02:35 tkusumi Exp $*/
+/*$NetBSD: dm_target_mirror.c,v 1.20 2019/12/15 05:56:02 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.19 2019/12/14 10:02:35 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_target_mirror.c,v 1.20 2019/12/15 05:56:02 tkusumi Exp $");
 
 /*
  * This file implements initial version of device-mapper mirror target.
@@ -43,7 +43,7 @@
 
 /* dm_target_mirror.c */
 int dm_target_mirror_init(dm_table_entry_t *, int, char **);
-char *dm_target_mirror_status(void *);
+char *dm_target_mirror_table(void *);
 int dm_target_mirror_strategy(dm_table_entry_t *, struct buf *);
 int dm_target_mirror_sync(dm_table_entry_t *);
 int dm_target_mirror_deps(dm_table_entry_t *, prop_array_t);
@@ -94,7 +94,7 @@
                dmt->version[1] = 0;
                dmt->version[2] = 0;
                dmt->init = &dm_target_mirror_init;
-               dmt->status = &dm_target_mirror_status;
+               dmt->table = &dm_target_mirror_table;
                dmt->strategy = &dm_target_mirror_strategy;
                dmt->sync = &dm_target_mirror_sync;
                dmt->deps = &dm_target_mirror_deps;
@@ -137,9 +137,9 @@
        return ENOSYS;
 }
 
-/* Status routine called to get params string. */
+/* Table routine called to get params string. */
 char *
-dm_target_mirror_status(void *target_config)
+dm_target_mirror_table(void *target_config)
 {
        return NULL;
 }
diff -r 4dd8fbaad75d -r 91f436ff50aa sys/dev/dm/dm_target_snapshot.c
--- a/sys/dev/dm/dm_target_snapshot.c   Sun Dec 15 04:50:28 2019 +0000
+++ b/sys/dev/dm/dm_target_snapshot.c   Sun Dec 15 05:56:02 2019 +0000
@@ -1,4 +1,4 @@
-/*        $NetBSD: dm_target_snapshot.c,v 1.31 2019/12/14 10:02:35 tkusumi Exp $      */
+/*        $NetBSD: dm_target_snapshot.c,v 1.32 2019/12/15 05:56:02 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_snapshot.c,v 1.31 2019/12/14 10:02:35 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_target_snapshot.c,v 1.32 2019/12/15 05:56:02 tkusumi Exp $");
 
 /*
  * 1. Suspend my_data to temporarily stop any I/O while the snapshot is being
@@ -88,7 +88,7 @@
 
 /* dm_target_snapshot.c */
 int dm_target_snapshot_init(dm_table_entry_t *, int, char **);
-char *dm_target_snapshot_status(void *);
+char *dm_target_snapshot_table(void *);
 int dm_target_snapshot_strategy(dm_table_entry_t *, struct buf *);
 int dm_target_snapshot_sync(dm_table_entry_t *);
 int dm_target_snapshot_deps(dm_table_entry_t *, prop_array_t);
@@ -97,7 +97,7 @@
 
 /* dm snapshot origin driver */
 int dm_target_snapshot_orig_init(dm_table_entry_t *, int, char **);
-char *dm_target_snapshot_orig_status(void *);
+char *dm_target_snapshot_orig_table(void *);
 int dm_target_snapshot_orig_strategy(dm_table_entry_t *, struct buf *);
 int dm_target_snapshot_orig_sync(dm_table_entry_t *);
 int dm_target_snapshot_orig_deps(dm_table_entry_t *, prop_array_t);
@@ -157,7 +157,7 @@
                dmt->version[1] = 0;
                dmt->version[2] = 5;
                dmt->init = &dm_target_snapshot_init;
-               dmt->status = &dm_target_snapshot_status;
+               dmt->table = &dm_target_snapshot_table;
                dmt->strategy = &dm_target_snapshot_strategy;
                dmt->sync = &dm_target_snapshot_sync;
                dmt->deps = &dm_target_snapshot_deps;
@@ -171,7 +171,7 @@
                dmt1->version[1] = 0;
                dmt1->version[2] = 5;



Home | Main Index | Thread Index | Old Index