Source-Changes-HG archive

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

[src/trunk]: src/sbin/raidctl Exclude parity map regions that don't actually ...



details:   https://anonhg.NetBSD.org/src/rev/9f416b162949
branches:  trunk
changeset: 752957:9f416b162949
user:      jld <jld%NetBSD.org@localhost>
date:      Sat Mar 13 07:21:37 2010 +0000

description:
Exclude parity map regions that don't actually exist from the dirty region count
in `raidctl -m`.  Makes for less confusing output during `raidctl -i`.

diffstat:

 sbin/raidctl/raidctl.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r f10687745819 -r 9f416b162949 sbin/raidctl/raidctl.c
--- a/sbin/raidctl/raidctl.c    Sat Mar 13 01:41:14 2010 +0000
+++ b/sbin/raidctl/raidctl.c    Sat Mar 13 07:21:37 2010 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: raidctl.c,v 1.45 2010/01/27 18:34:02 christos Exp $   */
+/*      $NetBSD: raidctl.c,v 1.46 2010/03/13 07:21:37 jld Exp $   */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: raidctl.c,v 1.45 2010/01/27 18:34:02 christos Exp $");
+__RCSID("$NetBSD: raidctl.c,v 1.46 2010/03/13 07:21:37 jld Exp $");
 #endif
 
 
@@ -504,7 +504,7 @@
                    st.ctrs.nwrite, st.ctrs.ncachesync, st.ctrs.nclearing);
 
                dr = 0;
-               for (i = 0; i < RF_PARITYMAP_NREG; i++)
+               for (i = 0; i < st.params.regions; i++)
                        if (isset(st.dirty, i))
                                dr++;
                printf("raid%d: %d dirty region%s\n", raidID, dr,



Home | Main Index | Thread Index | Old Index