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: Remove unconditional debug prints in targets'...



details:   https://anonhg.NetBSD.org/src/rev/7cdebad860f2
branches:  trunk
changeset: 967542:7cdebad860f2
user:      tkusumi <tkusumi%NetBSD.org@localhost>
date:      Sat Dec 14 10:02:35 2019 +0000

description:
dm: Remove unconditional debug prints in targets' ->strategy()

Having debug prints in ->strategy() by default just to tell ->strategy()
is called is overkill.
taken-from: DragonFlyBSD

diffstat:

 sys/dev/dm/dm_target_error.c    |  6 ++----
 sys/dev/dm/dm_target_linear.c   |  8 ++------
 sys/dev/dm/dm_target_mirror.c   |  6 ++----
 sys/dev/dm/dm_target_snapshot.c |  8 ++------
 sys/dev/dm/dm_target_stripe.c   |  7 ++-----
 sys/dev/dm/dm_target_zero.c     |  6 ++----
 6 files changed, 12 insertions(+), 29 deletions(-)

diffs (179 lines):

diff -r bf553fb72f96 -r 7cdebad860f2 sys/dev/dm/dm_target_error.c
--- a/sys/dev/dm/dm_target_error.c      Sat Dec 14 09:05:30 2019 +0000
+++ b/sys/dev/dm/dm_target_error.c      Sat Dec 14 10:02:35 2019 +0000
@@ -1,4 +1,4 @@
-/*        $NetBSD: dm_target_error.c,v 1.19 2019/12/12 16:28:24 tkusumi Exp $      */
+/*        $NetBSD: dm_target_error.c,v 1.20 2019/12/14 10:02:35 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.19 2019/12/12 16:28:24 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_target_error.c,v 1.20 2019/12/14 10:02:35 tkusumi Exp $");
 
 /*
  * This file implements initial version of device-mapper error target.
@@ -133,8 +133,6 @@
 dm_target_error_strategy(dm_table_entry_t *table_en, struct buf *bp)
 {
 
-       printf("Error target read function called!!\n");
-
        bp->b_error = EIO;
        bp->b_resid = 0;
 
diff -r bf553fb72f96 -r 7cdebad860f2 sys/dev/dm/dm_target_linear.c
--- a/sys/dev/dm/dm_target_linear.c     Sat Dec 14 09:05:30 2019 +0000
+++ b/sys/dev/dm/dm_target_linear.c     Sat Dec 14 10:02:35 2019 +0000
@@ -1,4 +1,4 @@
-/*        $NetBSD: dm_target_linear.c,v 1.27 2019/12/12 16:28:24 tkusumi Exp $      */
+/*        $NetBSD: dm_target_linear.c,v 1.28 2019/12/14 10:02:35 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.27 2019/12/12 16:28:24 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_target_linear.c,v 1.28 2019/12/14 10:02:35 tkusumi Exp $");
 
 /*
  * This file implements initial version of device-mapper dklinear target.
@@ -114,15 +114,11 @@
 
        tlc = table_en->target_config;
 
-/*     printf("Linear target read function called %" PRIu64 "!!\n",
-       tlc->offset);*/
-
        bp->b_blkno += tlc->offset;
 
        VOP_STRATEGY(tlc->pdev->pdev_vnode, bp);
 
        return 0;
-
 }
 
 /*
diff -r bf553fb72f96 -r 7cdebad860f2 sys/dev/dm/dm_target_mirror.c
--- a/sys/dev/dm/dm_target_mirror.c     Sat Dec 14 09:05:30 2019 +0000
+++ b/sys/dev/dm/dm_target_mirror.c     Sat Dec 14 10:02:35 2019 +0000
@@ -1,4 +1,4 @@
-/*$NetBSD: dm_target_mirror.c,v 1.18 2019/12/12 16:28:24 tkusumi Exp $*/
+/*$NetBSD: dm_target_mirror.c,v 1.19 2019/12/14 10:02:35 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.18 2019/12/12 16:28:24 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_target_mirror.c,v 1.19 2019/12/14 10:02:35 tkusumi Exp $");
 
 /*
  * This file implements initial version of device-mapper mirror target.
@@ -149,8 +149,6 @@
 dm_target_mirror_strategy(dm_table_entry_t *table_en, struct buf *bp)
 {
 
-       printf("Mirror target read function called!!\n");
-
        bp->b_error = EIO;
        bp->b_resid = 0;
 
diff -r bf553fb72f96 -r 7cdebad860f2 sys/dev/dm/dm_target_snapshot.c
--- a/sys/dev/dm/dm_target_snapshot.c   Sat Dec 14 09:05:30 2019 +0000
+++ b/sys/dev/dm/dm_target_snapshot.c   Sat Dec 14 10:02:35 2019 +0000
@@ -1,4 +1,4 @@
-/*        $NetBSD: dm_target_snapshot.c,v 1.30 2019/12/12 16:28:24 tkusumi Exp $      */
+/*        $NetBSD: dm_target_snapshot.c,v 1.31 2019/12/14 10:02:35 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.30 2019/12/12 16:28:24 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_target_snapshot.c,v 1.31 2019/12/14 10:02:35 tkusumi Exp $");
 
 /*
  * 1. Suspend my_data to temporarily stop any I/O while the snapshot is being
@@ -300,8 +300,6 @@
 dm_target_snapshot_strategy(dm_table_entry_t *table_en, struct buf *bp)
 {
 
-       printf("Snapshot target read function called!!\n");
-
        bp->b_error = EIO;
        bp->b_resid = 0;
 
@@ -454,8 +452,6 @@
 dm_target_snapshot_orig_strategy(dm_table_entry_t *table_en, struct buf *bp)
 {
 
-       printf("Snapshot_Orig target read function called!!\n");
-
        bp->b_error = EIO;
        bp->b_resid = 0;
 
diff -r bf553fb72f96 -r 7cdebad860f2 sys/dev/dm/dm_target_stripe.c
--- a/sys/dev/dm/dm_target_stripe.c     Sat Dec 14 09:05:30 2019 +0000
+++ b/sys/dev/dm/dm_target_stripe.c     Sat Dec 14 10:02:35 2019 +0000
@@ -1,4 +1,4 @@
-/*$NetBSD: dm_target_stripe.c,v 1.34 2019/12/12 16:28:24 tkusumi Exp $*/
+/*$NetBSD: dm_target_stripe.c,v 1.35 2019/12/14 10:02:35 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_stripe.c,v 1.34 2019/12/12 16:28:24 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_target_stripe.c,v 1.35 2019/12/14 10:02:35 tkusumi Exp $");
 
 /*
  * This file implements initial version of device-mapper stripe target.
@@ -226,9 +226,6 @@
        if (tsc == NULL)
                return 0;
 
-/*     printf("Stripe target read function called %" PRIu64 "!!\n",
-       tlc->offset);*/
-
        /* calculate extent of request */
        KASSERT(bp->b_resid % DEV_BSIZE == 0);
 
diff -r bf553fb72f96 -r 7cdebad860f2 sys/dev/dm/dm_target_zero.c
--- a/sys/dev/dm/dm_target_zero.c       Sat Dec 14 09:05:30 2019 +0000
+++ b/sys/dev/dm/dm_target_zero.c       Sat Dec 14 10:02:35 2019 +0000
@@ -1,4 +1,4 @@
-/*        $NetBSD: dm_target_zero.c,v 1.21 2019/12/12 16:28:24 tkusumi Exp $      */
+/*        $NetBSD: dm_target_zero.c,v 1.22 2019/12/14 10:02:35 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_zero.c,v 1.21 2019/12/12 16:28:24 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_target_zero.c,v 1.22 2019/12/14 10:02:35 tkusumi Exp $");
 
 /*
  * This file implements initial version of device-mapper zero target.
@@ -139,8 +139,6 @@
 dm_target_zero_strategy(dm_table_entry_t *table_en, struct buf *bp)
 {
 
-       /* printf("Zero target read function called %d!!\n", bp->b_bcount); */
-
        memset(bp->b_data, 0, bp->b_bcount);
        bp->b_resid = 0;        /* nestiobuf_done wants b_resid = 0 to be sure
                                 * that there is no other io to done  */



Home | Main Index | Thread Index | Old Index