svn commit: r218504 - projects/graid/head/sys/geom/raid
Warner Losh
imp at FreeBSD.org
Thu Feb 10 02:48:27 UTC 2011
Author: imp
Date: Thu Feb 10 02:48:27 2011
New Revision: 218504
URL: http://svn.freebsd.org/changeset/base/218504
Log:
Move error counting from subdisk to disk.
Modified:
projects/graid/head/sys/geom/raid/g_raid.h
projects/graid/head/sys/geom/raid/tr_raid1.c
Modified: projects/graid/head/sys/geom/raid/g_raid.h
==============================================================================
--- projects/graid/head/sys/geom/raid/g_raid.h Thu Feb 10 01:24:09 2011 (r218503)
+++ projects/graid/head/sys/geom/raid/g_raid.h Thu Feb 10 02:48:27 2011 (r218504)
@@ -151,6 +151,7 @@ struct g_raid_disk {
u_int d_state; /* Disk state. */
u_int d_load; /* Disk average load. */
off_t d_last_offset; /* Last head offset. */
+ int d_read_errs; /* Count of the read errors */
TAILQ_HEAD(, g_raid_subdisk) d_subdisks; /* List of subdisks. */
TAILQ_ENTRY(g_raid_disk) d_next; /* Next disk in the node. */
};
@@ -185,7 +186,6 @@ struct g_raid_subdisk {
u_int sd_pos; /* Position in volume. */
u_int sd_state; /* Subdisk state. */
off_t sd_rebuild_pos; /* Rebuild position. */
- int sd_read_errs; /* Count of the read errors */
int sd_recovery; /* Count of recovery reqs. */
TAILQ_ENTRY(g_raid_subdisk) sd_next; /* Next subdisk on disk. */
};
Modified: projects/graid/head/sys/geom/raid/tr_raid1.c
==============================================================================
--- projects/graid/head/sys/geom/raid/tr_raid1.c Thu Feb 10 01:24:09 2011 (r218503)
+++ projects/graid/head/sys/geom/raid/tr_raid1.c Thu Feb 10 02:48:27 2011 (r218504)
@@ -811,10 +811,10 @@ rebuild_round_done:
* another disk drive, if available, before erroring out the
* read.
*/
- sd->sd_read_errs++;
+ sd->sd_disk->d_read_errs++;
G_RAID_LOGREQ(0, bp,
"Read error (%d), %d read errors total",
- bp->bio_error, sd->sd_read_errs);
+ bp->bio_error, sd->sd_disk->d_read_errs);
/*
* If there are too many read errors, we move to degraded.
@@ -823,7 +823,7 @@ rebuild_round_done:
* drive, which kicks off a resync?
*/
do_write = 1;
- if (sd->sd_read_errs > g_raid1_read_err_thresh) {
+ if (sd->sd_disk->d_read_errs > g_raid1_read_err_thresh) {
g_raid_tr_raid1_fail_disk(sd->sd_softc, sd, sd->sd_disk);
if (pbp->bio_children == 1)
do_write = 0;
More information about the svn-src-projects
mailing list