diff options
author | Thierry Deval <tdeval@cvs.openbsd.org> | 2002-08-09 15:10:21 +0000 |
---|---|---|
committer | Thierry Deval <tdeval@cvs.openbsd.org> | 2002-08-09 15:10:21 +0000 |
commit | 4c54f18f04b4867809076b446cce65277de3ab3f (patch) | |
tree | c9e2a5a06b17850f58f5f1886a06ec9d63a8a894 /sys | |
parent | 7ca1798c557106ef6290ba8913d2ce6fc3e94475 (diff) |
Remove those noisy informational messages from dmesg.
Use the option RAIDDEBUG to get these.
Theo, thanks for suggesting.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/raidframe/rf_declusterPQ.c | 4 | ||||
-rw-r--r-- | sys/dev/raidframe/rf_driver.c | 4 | ||||
-rw-r--r-- | sys/dev/raidframe/rf_layout.c | 19 | ||||
-rw-r--r-- | sys/dev/raidframe/rf_openbsdkintf.c | 59 | ||||
-rw-r--r-- | sys/dev/raidframe/rf_reconstruct.c | 6 |
5 files changed, 54 insertions, 38 deletions
diff --git a/sys/dev/raidframe/rf_declusterPQ.c b/sys/dev/raidframe/rf_declusterPQ.c index d1ea277bb3a..1fa4692a96b 100644 --- a/sys/dev/raidframe/rf_declusterPQ.c +++ b/sys/dev/raidframe/rf_declusterPQ.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rf_declusterPQ.c,v 1.2 1999/02/16 00:02:35 niklas Exp $ */ +/* $OpenBSD: rf_declusterPQ.c,v 1.3 2002/08/09 15:10:20 tdeval Exp $ */ /* $NetBSD: rf_declusterPQ.c,v 1.3 1999/02/05 00:06:09 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. @@ -83,7 +83,9 @@ rf_ConfigureDeclusteredPQ( cfgBuf += sizeof(int); if (k <= 2) { +#ifdef RAIDDEBUG printf("RAIDFRAME: k=%d, minimum value 2\n", k); +#endif /* RAIDDEBUG */ return (EINVAL); } /* 1. create layout specific structure */ diff --git a/sys/dev/raidframe/rf_driver.c b/sys/dev/raidframe/rf_driver.c index 40d6191a4c4..57580f7b390 100644 --- a/sys/dev/raidframe/rf_driver.c +++ b/sys/dev/raidframe/rf_driver.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rf_driver.c,v 1.9 2000/08/08 16:07:40 peter Exp $ */ +/* $OpenBSD: rf_driver.c,v 1.10 2002/08/09 15:10:20 tdeval Exp $ */ /* $NetBSD: rf_driver.c,v 1.37 2000/06/04 02:05:13 oster Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -360,8 +360,10 @@ rf_Configure(raidPtr, cfgPtr, ac) return (rc); } /* initialize globals */ +#ifdef RAIDDEBUG printf("RAIDFRAME: protectedSectors is %ld\n", rf_protectedSectors); +#endif /* RAIDDEBUG */ rf_clear_debug_print_buffer(); diff --git a/sys/dev/raidframe/rf_layout.c b/sys/dev/raidframe/rf_layout.c index de80c0096b6..bc83f0f7ea5 100644 --- a/sys/dev/raidframe/rf_layout.c +++ b/sys/dev/raidframe/rf_layout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rf_layout.c,v 1.4 2000/08/08 16:07:42 peter Exp $ */ +/* $OpenBSD: rf_layout.c,v 1.5 2002/08/09 15:10:20 tdeval Exp $ */ /* $NetBSD: rf_layout.c,v 1.6 2000/04/17 19:35:12 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. @@ -476,17 +476,18 @@ rf_ConfigureLayout( raidPtr->headSepLimit = rf_GetDefaultHeadSepLimit(raidPtr); } - printf("RAIDFRAME: Configure (%s): total number of sectors is %lu (%lu MB)\n", - layoutPtr->map->configName, - (unsigned long) raidPtr->totalSectors, - (unsigned long) (raidPtr->totalSectors / 1024 * (1 << raidPtr->logBytesPerSector) / 1024)); +#ifdef RAIDDEBUG if (raidPtr->headSepLimit >= 0) { - printf("RAIDFRAME(%s): Using %ld floating recon bufs with head sep limit %ld\n", - layoutPtr->map->configName, (long) raidPtr->numFloatingReconBufs, (long) raidPtr->headSepLimit); + printf("RAIDFRAME(%s): Using %ld floating recon bufs" + " with head sep limit %ld\n", layoutPtr->map->configName, + (long) raidPtr->numFloatingReconBufs, + (long) raidPtr->headSepLimit); } else { - printf("RAIDFRAME(%s): Using %ld floating recon bufs with no head sep limit\n", - layoutPtr->map->configName, (long) raidPtr->numFloatingReconBufs); + printf("RAIDFRAME(%s): Using %ld floating recon bufs" + " with no head sep limit\n", layoutPtr->map->configName, + (long) raidPtr->numFloatingReconBufs); } +#endif /* RAIDDEBUG */ return (0); } diff --git a/sys/dev/raidframe/rf_openbsdkintf.c b/sys/dev/raidframe/rf_openbsdkintf.c index bb101951113..62b966abb35 100644 --- a/sys/dev/raidframe/rf_openbsdkintf.c +++ b/sys/dev/raidframe/rf_openbsdkintf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rf_openbsdkintf.c,v 1.18 2002/08/05 22:11:27 tdeval Exp $ */ +/* $OpenBSD: rf_openbsdkintf.c,v 1.19 2002/08/09 15:10:20 tdeval Exp $ */ /* $NetBSD: rf_netbsdkintf.c,v 1.109 2001/07/27 03:30:07 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -470,7 +470,7 @@ raidattach(num) if (raidautoconfig) { /* 1. locate all RAID components on the system */ -#ifdef DEBUG +#ifdef RAIDDEBUG printf("Searching for raid components...\n"); #endif ac_list = rf_find_raid_components(); @@ -517,14 +517,14 @@ rf_buildroothack(arg) if (!retcode) { if (cset->rootable) { rootID = raidID; -#ifdef DEBUG +#ifdef RAIDDEBUG printf("eligible root device %d: raid%d\n", num_root, rootID); -#endif /* DEBUG */ +#endif /* RAIDDEBUG */ num_root++; } } else { /* The autoconfig didn't work :( */ -#ifdef DEBUG +#ifdef RAIDDEBUG printf("Autoconfig failed with code %d for raid%d\n", retcode, raidID); #endif rf_release_all_vps(cset); @@ -1144,6 +1144,7 @@ raidioctl(dev, cmd, data, flag, p) trying to patch things. */ +#ifdef RAIDDEBUG printf("Got component label:\n"); printf("Version: %d\n",clabel->version); printf("Serial Number: %d\n",clabel->serial_number); @@ -1154,6 +1155,7 @@ raidioctl(dev, cmd, data, flag, p) printf("Num Columns: %d\n", clabel->num_columns); printf("Clean: %d\n", clabel->clean); printf("Status: %d\n", clabel->status); +#endif row = clabel->row; column = clabel->column; @@ -1227,13 +1229,13 @@ raidioctl(dev, cmd, data, flag, p) case RAIDFRAME_SET_AUTOCONFIG: d = rf_set_autoconfig(raidPtr, *(int *) data); - printf("New autoconfig value is: %d\n", d); + db1_printf(("New autoconfig value is: %d\n", d)); *(int *) data = d; return (retcode); case RAIDFRAME_SET_ROOT: d = rf_set_rootpartition(raidPtr, *(int *) data); - printf("New rootpartition value is: %d\n", d); + db1_printf(("New rootpartition value is: %d\n", d)); *(int *) data = d; return (retcode); @@ -1278,7 +1280,7 @@ raidioctl(dev, cmd, data, flag, p) sizeof(RF_SingleComponent_t)); row = component.row; column = component.column; - printf("Rebuild: %d %d\n",row, column); + db1_printf(("Rebuild: %d %d\n",row, column)); if ((row < 0) || (row >= raidPtr->numRow) || (column < 0) || (column >= raidPtr->numCol)) { return(EINVAL); @@ -1365,8 +1367,8 @@ raidioctl(dev, cmd, data, flag, p) rr->col < 0 || rr->col >= raidPtr->numCol) return (EINVAL); - printf("raid%d: Failing the disk: row: %d col: %d\n", - unit, rr->row, rr->col); + db1_printf(("raid%d: Failing the disk: row: %d col: %d\n", + unit, rr->row, rr->col)); /* * Make a copy of the recon request so that we don't @@ -1694,7 +1696,6 @@ raidinit(raidPtr) cf->cf_unit = unit; config_attach(NULL, cf, NULL, NULL); - printf("\n"); /* pretty up config_attach()'s output. */ } /* @@ -1944,7 +1945,7 @@ rf_DispatchKernelIO(queue, req) * I'm leaving this in, as I've never actually seen it * used, and I'd like folks to report it... GO */ - printf(("WAKEUP CALLED\n")); + db1_printf(("WAKEUP CALLED\n")); queue->numOutstanding++; /* XXX need to glue the original buffer into this?? */ @@ -2196,11 +2197,13 @@ raidgetdisklabel(dev) * same componets are used, and old disklabel may used * if that is found. */ +#ifdef RAIDDEBUG if (lp->d_secperunit != rs->sc_size) printf("WARNING: %s: " "total sector size in disklabel (%d) != " "the size of raid (%ld)\n", rs->sc_xname, lp->d_secperunit, (long) rs->sc_size); +#endif /* RAIDDEBUG */ for (i = 0; i < lp->d_npartitions; i++) { pp = &lp->d_partitions[i]; if (pp->p_offset + pp->p_size > rs->sc_size) @@ -2252,9 +2255,9 @@ raidlookup(path, p, vpp) NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, path, p); if ((error = vn_open(&nd, FREAD|FWRITE, 0)) != 0) { -#ifdef DEBUG +#ifdef RAIDDEBUG printf("RAIDframe: vn_open returned %d\n", error); -#endif +#endif /* RAIDDEBUG */ return (error); } vp = nd.ni_vp; @@ -2382,14 +2385,13 @@ raidread_component_label(dev, b_vp, clabel) rf_print_component_label( clabel ); #endif } else { -#if 0 - printf("Failed to read RAID component label!\n"); -#endif + db1_printf(("Failed to read RAID component label!\n")); } brelse(bp); return(error); } + /* ARGSUSED */ int raidwrite_component_label(dev, b_vp, clabel) @@ -2418,9 +2420,7 @@ raidwrite_component_label(dev, b_vp, clabel) error = biowait(bp); brelse(bp); if (error) { -#if 1 printf("Failed to write RAID component info!\n"); -#endif } return(error); @@ -2666,7 +2666,8 @@ rf_UnconfigureVnodes(raidPtr) for (r = 0; r < raidPtr->numRow; r++) { for (c = 0; c < raidPtr->numCol; c++) { - printf("Closing vnode for row: %d col: %d\n", r, c); + db1_printf(("Closing vnode for row: %d col: %d\n", + r, c)); vp = raidPtr->raid_cinfo[r][c].ci_vp; acd = raidPtr->Disks[r][c].auto_configured; rf_close_component(raidPtr, vp, acd); @@ -2675,7 +2676,7 @@ rf_UnconfigureVnodes(raidPtr) } } for (r = 0; r < raidPtr->numSpare; r++) { - printf("Closing vnode for spare: %d\n", r); + db1_printf(("Closing vnode for spare: %d\n", r)); vp = raidPtr->raid_cinfo[0][raidPtr->numCol + r].ci_vp; acd = raidPtr->Disks[0][raidPtr->numCol + r].auto_configured; rf_close_component(raidPtr, vp, acd); @@ -2890,7 +2891,7 @@ rf_find_raid_components() if (rf_reasonable_label(clabel) && (clabel->partitionSize <= label.d_partitions[i].p_size)) { -#ifdef DEBUG +#ifdef RAIDDEBUG printf("Component on: %s%c: %d\n", dv->dv_xname, 'a'+i, label.d_partitions[i].p_size); @@ -2976,7 +2977,7 @@ rf_print_component_label(clabel) clabel->root_partition ? "Yes" : "No" ); printf(" Last configured as: raid%d\n", clabel->last_unit ); #if 0 - printf(" Config order: %d\n", clabel->config_order); + printf(" Config order: %d\n", clabel->config_order); #endif } @@ -3162,7 +3163,7 @@ rf_have_enough_components(cset) (ac->clabel->column == c) && (ac->clabel->mod_counter == mod_counter)) { /* it's this one... */ -#ifdef DEBUG +#ifdef RAIDDEBUG printf("Found: %s at %d,%d\n", ac->devname,r,c); #endif @@ -3481,7 +3482,7 @@ rf_auto_config_set(cset,unit) int raidID; int retcode; - printf("RAID autoconfigure\n"); + db1_printf(("RAID autoconfigure\n")); retcode = 0; *unit = -1; @@ -3534,7 +3535,6 @@ rf_auto_config_set(cset,unit) printf("(Out of RAID devs!)\n"); return(1); } - printf("Configuring raid%d:\n",raidID); raidPtr = raidPtrs[raidID]; /* XXX all this stuff should be done SOMEWHERE ELSE! */ @@ -3562,6 +3562,13 @@ rf_auto_config_set(cset,unit) } } + printf(": (%s) total number of sectors is %lu (%lu MB)%s\n", + (raidPtrs[raidID]->Layout).map->configName, + (unsigned long) raidPtrs[raidID]->totalSectors, + (unsigned long) (raidPtrs[raidID]->totalSectors / 1024 * + (1 << raidPtrs[raidID]->logBytesPerSector) / 1024), + raidPtrs[raidID]->root_partition ? " as root" : ""); + /* 5. Cleanup */ free(config, M_RAIDFRAME); diff --git a/sys/dev/raidframe/rf_reconstruct.c b/sys/dev/raidframe/rf_reconstruct.c index b5cd80a7665..90a6435e1df 100644 --- a/sys/dev/raidframe/rf_reconstruct.c +++ b/sys/dev/raidframe/rf_reconstruct.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rf_reconstruct.c,v 1.11 2002/03/14 01:27:02 millert Exp $ */ +/* $OpenBSD: rf_reconstruct.c,v 1.12 2002/08/09 15:10:20 tdeval Exp $ */ /* $NetBSD: rf_reconstruct.c,v 1.26 2000/06/04 02:05:13 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. @@ -404,15 +404,19 @@ rf_ReconstructInPlace(raidPtr, row, col) /* some component other than this has failed. Let's not make things worse than they already are... */ +#ifdef RAIDDEBUG printf("RAIDFRAME: Unable to reconstruct to disk at:\n"); printf(" Row: %d Col: %d Too many failures.\n", row, col); +#endif /* RAIDDEBUG */ RF_UNLOCK_MUTEX(raidPtr->mutex); return (EINVAL); } if (raidPtr->Disks[row][col].status == rf_ds_reconstructing) { +#ifdef RAIDDEBUG printf("RAIDFRAME: Unable to reconstruct to disk at:\n"); printf(" Row: %d Col: %d Reconstruction already occuring!\n", row, col); +#endif /* RAIDDEBUG */ RF_UNLOCK_MUTEX(raidPtr->mutex); return (EINVAL); |