Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/dm fix typos in sys/dev/dm code comments and documen...



details:   https://anonhg.NetBSD.org/src/rev/8aae9e241b1c
branches:  trunk
changeset: 1023061:8aae9e241b1c
user:      andvar <andvar%NetBSD.org@localhost>
date:      Sat Aug 21 22:23:33 2021 +0000

description:
fix typos in sys/dev/dm code comments and documentation.
also remove some trailing space in documentation.

diffstat:

 sys/dev/dm/dm.h            |   6 +-
 sys/dev/dm/dm_dev.c        |   6 +-
 sys/dev/dm/dm_ioctl.c      |  12 +++---
 sys/dev/dm/dm_pdev.c       |   6 +-
 sys/dev/dm/dm_table.c      |  10 +++---
 sys/dev/dm/dm_target.c     |   8 ++--
 sys/dev/dm/doc/design.txt  |  24 +++++++-------
 sys/dev/dm/doc/locking.txt |  71 ++++++++++++++++++---------------------------
 8 files changed, 65 insertions(+), 78 deletions(-)

diffs (truncated from 418 to 300 lines):

diff -r 57be83dcbeec -r 8aae9e241b1c sys/dev/dm/dm.h
--- a/sys/dev/dm/dm.h   Sat Aug 21 17:50:02 2021 +0000
+++ b/sys/dev/dm/dm.h   Sat Aug 21 22:23:33 2021 +0000
@@ -1,4 +1,4 @@
-/*        $NetBSD: dm.h,v 1.55 2020/01/21 16:27:53 tkusumi Exp $      */
+/*        $NetBSD: dm.h,v 1.56 2021/08/21 22:23:33 andvar Exp $      */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -117,7 +117,7 @@
        struct vnode *pdev_vnode;
        uint64_t pdev_numsec;
        unsigned int pdev_secsize;
-       int ref_cnt; /* reference counter for users ofthis pdev */
+       int ref_cnt; /* reference counter for users of this pdev */
 
        SLIST_ENTRY(dm_pdev) next_pdev;
 } dm_pdev_t;
@@ -137,7 +137,7 @@
        uint64_t minor; /* Device minor number */
        uint32_t flags; /* store communication protocol flags */
 
-       kmutex_t dev_mtx; /* mutex for generall device lock */
+       kmutex_t dev_mtx; /* mutex for general device lock */
        kcondvar_t dev_cv; /* cv for between ioctl synchronisation */
 
        uint32_t event_nr;
diff -r 57be83dcbeec -r 8aae9e241b1c sys/dev/dm/dm_dev.c
--- a/sys/dev/dm/dm_dev.c       Sat Aug 21 17:50:02 2021 +0000
+++ b/sys/dev/dm/dm_dev.c       Sat Aug 21 22:23:33 2021 +0000
@@ -1,4 +1,4 @@
-/*        $NetBSD: dm_dev.c,v 1.18 2020/07/08 15:07:13 thorpej Exp $      */
+/*        $NetBSD: dm_dev.c,v 1.19 2021/08/21 22:23:33 andvar 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.18 2020/07/08 15:07:13 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_dev.c,v 1.19 2021/08/21 22:23:33 andvar Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -270,7 +270,7 @@
 
 /*
  * Destroy all devices created in device-mapper. Remove all tables
- * free all allocated memmory.
+ * free all allocated memory.
  */
 int
 dm_dev_destroy(void)
diff -r 57be83dcbeec -r 8aae9e241b1c sys/dev/dm/dm_ioctl.c
--- a/sys/dev/dm/dm_ioctl.c     Sat Aug 21 17:50:02 2021 +0000
+++ b/sys/dev/dm/dm_ioctl.c     Sat Aug 21 22:23:33 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dm_ioctl.c,v 1.54 2021/08/20 20:25:27 andvar Exp $      */
+/* $NetBSD: dm_ioctl.c,v 1.55 2021/08/21 22:23:33 andvar 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.54 2021/08/20 20:25:27 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_ioctl.c,v 1.55 2021/08/21 22:23:33 andvar Exp $");
 
 /*
  * Locking is used to synchronise between ioctl calls and between dm_table's
@@ -53,10 +53,10 @@
  * on uint8_t argument.
  *
  * dm_table_release must be called for every table_entry from
- * dm_table_get_entry. Between these to calls tables can'tbe switched
+ * dm_table_get_entry. Between these two calls tables can't be switched
  * or destroyed.
  *
- * dm_table_head_init initialize talbe_entries SLISTS and io_cv.
+ * dm_table_head_init initialize table_entries SLISTS and io_cv.
  *
  * dm_table_head_destroy destroy cv.
  *
@@ -265,7 +265,7 @@
 }
 
 /*
- * Get list of created device-mapper devices fromglobal list and
+ * Get list of created device-mapper devices from global list and
  * send it to kernel.
  *
  * Output dictionary:
@@ -695,7 +695,7 @@
 
 /*
  * Load new table/tables to device.
- * Call apropriate target init routine open all physical pdev's and
+ * Call appropriate target init routine to open all physical pdev's and
  * link them to device. For other targets mirror, strip, snapshot
  * etc. also add dependency devices to upcalls list.
  *
diff -r 57be83dcbeec -r 8aae9e241b1c sys/dev/dm/dm_pdev.c
--- a/sys/dev/dm/dm_pdev.c      Sat Aug 21 17:50:02 2021 +0000
+++ b/sys/dev/dm/dm_pdev.c      Sat Aug 21 22:23:33 2021 +0000
@@ -1,4 +1,4 @@
-/*        $NetBSD: dm_pdev.c,v 1.22 2019/12/20 16:16:36 tkusumi Exp $      */
+/*        $NetBSD: dm_pdev.c,v 1.23 2021/08/21 22:23:33 andvar 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.22 2019/12/20 16:16:36 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_pdev.c,v 1.23 2021/08/21 22:23:33 andvar Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -211,7 +211,7 @@
 }
 
 /*
- * This funcion is called from dm_dev_remove_ioctl.
+ * This function is called from dm_dev_remove_ioctl.
  * When I'm removing device from list, I have to decrement
  * reference counter. If reference counter is 0 I will remove
  * dmp from global list and from device list to. And I will CLOSE
diff -r 57be83dcbeec -r 8aae9e241b1c sys/dev/dm/dm_table.c
--- a/sys/dev/dm/dm_table.c     Sat Aug 21 17:50:02 2021 +0000
+++ b/sys/dev/dm/dm_table.c     Sat Aug 21 22:23:33 2021 +0000
@@ -1,4 +1,4 @@
-/*        $NetBSD: dm_table.c,v 1.20 2021/08/20 20:25:27 andvar Exp $      */
+/*        $NetBSD: dm_table.c,v 1.21 2021/08/21 22:23:33 andvar 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_table.c,v 1.20 2021/08/20 20:25:27 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_table.c,v 1.21 2021/08/21 22:23:33 andvar Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -141,7 +141,7 @@
  * Destroy all table data. This function can run when there are no
  * readers on table lists.
  *
- * XXX Is it ok to call kmem_free and potentialy VOP_CLOSE with held mutex ?xs
+ * XXX Is it ok to call kmem_free and potentially VOP_CLOSE with held mutex ?xs
  */
 int
 dm_table_destroy(dm_table_head_t *head, uint8_t table_id)
@@ -274,8 +274,8 @@
 /*
  * 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
- * doesn't need to be true when userspace user receive it (after return
- * there can be dm_dev_resume_ioctl), therfore this isonly informative.
+ * doesn't need to be true when userspace user receives it (after return
+ * there can be dm_dev_resume_ioctl), therefore this is only informative.
  */
 int
 dm_table_get_target_count(dm_table_head_t *head, uint8_t table_id)
diff -r 57be83dcbeec -r 8aae9e241b1c sys/dev/dm/dm_target.c
--- a/sys/dev/dm/dm_target.c    Sat Aug 21 17:50:02 2021 +0000
+++ b/sys/dev/dm/dm_target.c    Sat Aug 21 22:23:33 2021 +0000
@@ -1,4 +1,4 @@
-/*        $NetBSD: dm_target.c,v 1.41 2020/07/08 15:07:13 thorpej Exp $      */
+/*        $NetBSD: dm_target.c,v 1.42 2021/08/21 22:23:33 andvar 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.41 2020/07/08 15:07:13 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_target.c,v 1.42 2021/08/21 22:23:33 andvar Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -122,7 +122,7 @@
 }
 
 /*
- * Search for name in TAIL and return apropriate pointer.
+ * Search for name in TAIL and return appropriate pointer.
  */
 static dm_target_t *
 dm_target_lookup_name(const char *dm_target_name)
@@ -148,7 +148,7 @@
 /*
  * Insert new target struct into the TAIL.
  * dm_target
- *   contains name, version, function pointer to specifif target functions.
+ *   contains name, version, function pointer to specific target functions.
  */
 int
 dm_target_insert(dm_target_t *dm_target)
diff -r 57be83dcbeec -r 8aae9e241b1c sys/dev/dm/doc/design.txt
--- a/sys/dev/dm/doc/design.txt Sat Aug 21 17:50:02 2021 +0000
+++ b/sys/dev/dm/doc/design.txt Sat Aug 21 22:23:33 2021 +0000
@@ -14,12 +14,12 @@
      mapped to physical. There are many targets linear, stripe, mirror etc.
 
      Functions available to dm device:
-              list available targets. They can be added with module in linux.                 
+              list available targets. They can be added with module in linux.
 
   3) dm table.
-     Every device-mapper device consits from one or more tables. Table specify 
-     Start, length of logical blocks and target which is used to map them to 
-     physical blocks. 
+     Every device-mapper device consists from one or more tables.
+     Table specifies start, length of logical blocks and target which is used
+     to map them to physical blocks.
 
      {start} {length} {target} | {device} {target parameters}
      
@@ -54,7 +54,7 @@
 
       out: struct dm-ioctl
 
-      Fuction:
+      Function:
         sends libdevmapper ioctl protocol version to kernel and ask for kernel version.
         If major and minor numbers are good we can continue.
 
@@ -111,7 +111,7 @@
 
     Implementation:
        Kernel driver will find device with name from struct dm_ioctl-name/uuid.
-       Change name of selected device to string foun behind struc dm_ioctl header 
+       Change name of selected device to string found behind struct dm_ioctl header 
        in userspace buffer.
 
  7) DM_DEV_SUSPEND
@@ -161,7 +161,7 @@
        Kernel driver will find device with name from struct dm_ioctl-name/uuid.
        Table is added to the inactive slot. Every device can have more than one 
        table loaded. Tables are stored in SLIST. This ioctl also open physical 
-       device spedcified in table and add it to dm_device specific pdev list.
+       device specified in table and add it to dm_device specific pdev list.
 
  11) DM_TABLE_CLEAR
 
@@ -192,7 +192,7 @@
 
      Implementation:
        Kernel driver will find device with name from struct dm_ioctl-name/uuid.
-       DM driver will copyout dm_target_spec structures behidn struct dm_ioctl.
+       DM driver will copyout dm_target_spec structures behind struct dm_ioctl.
 
  14) DM_LIST_VERSIONS  
      
@@ -257,11 +257,11 @@
    
        
 
-               Desing of new device-mapper ioctl interface
+               Design of new device-mapper ioctl interface
 
    Basic architecture of device-mapper -> libdevmapper ioctl interface is this. 
    Libdevmapper allocate buffer with size of data_size. At the start of this buffer 
-   dm-ioctl structure is placed. any aditional information from/to kernel are placed
+   dm-ioctl structure is placed. any additional information from/to kernel are placed
    behind end (start of data part is pointed with data_start var.) of dm-ioctl struct. 
    
    Kernel driver then after ioctl call have to copyin data from userspace to kernel.
@@ -398,7 +398,7 @@
     
     struct dm_name_list {
         uint64_t dev;
-        uint32_t next;          /* offset to the next record from                                    
+        uint32_t next;          /* offset to the next record from
                                    the _start_ of this */
         char name[0];
     };
@@ -470,6 +470,6 @@
        <key>target_type</key>
        <string>...</string>
        
-       <key>aditional info</key>
+       <key>additional info</key>
        <string>...</string>
       </dict>
diff -r 57be83dcbeec -r 8aae9e241b1c sys/dev/dm/doc/locking.txt
--- a/sys/dev/dm/doc/locking.txt        Sat Aug 21 17:50:02 2021 +0000
+++ b/sys/dev/dm/doc/locking.txt        Sat Aug 21 22:23:33 2021 +0000
@@ -43,7 +43,7 @@
         int minor;
         uint32_t flags; /* store communication protocol flags */
 
-        kmutex_t dev_mtx; /* mutex for generall device lock */
+        kmutex_t dev_mtx; /* mutex for general device lock */



Home | Main Index | Thread Index | Old Index