Date: Tue, 11 Jan 2011 22:40:18 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r217293 - projects/graid/head/sys/geom/raid Message-ID: <201101112240.p0BMeIve040435@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Tue Jan 11 22:40:18 2011 New Revision: 217293 URL: http://svn.freebsd.org/changeset/base/217293 Log: Go ahead and log read recovery operations now that I grok the G_RAID_LOGREQ macro. Modified: projects/graid/head/sys/geom/raid/tr_raid1.c Modified: projects/graid/head/sys/geom/raid/tr_raid1.c ============================================================================== --- projects/graid/head/sys/geom/raid/tr_raid1.c Tue Jan 11 22:15:30 2011 (r217292) +++ projects/graid/head/sys/geom/raid/tr_raid1.c Tue Jan 11 22:40:18 2011 (r217293) @@ -300,12 +300,17 @@ g_raid_tr_iodone_raid1(struct g_raid_tr_ pbp = bp->bio_parent; if (bp->bio_error != 0 && bp->bio_cmd == BIO_READ && pbp->bio_children == 1) { + /* * Retry the read error on the other disk drive, if * available, before erroring out the read. */ vol = tr->tro_volume; sd->sd_read_errs++; + G_RAID_LOGREQ(3, bp, + "Read failure, attempting recovery. %d total read errs", + sd->sd_read_errs); + /* * XXX Check threshold of sd_read_errs here to declare * this subdisk bad? @@ -319,6 +324,7 @@ g_raid_tr_iodone_raid1(struct g_raid_tr_ cbp = g_clone_bio(pbp); if (cbp == NULL) break; + G_RAID_LOGREQ(3, cbp, "Retrying read"); g_raid_subdisk_iostart(nsd, cbp); pbp->bio_inbed++; return; @@ -329,6 +335,7 @@ g_raid_tr_iodone_raid1(struct g_raid_tr_ * * XXX degrade/break the mirror? */ + G_RAID_LOGREQ(3, bp, "Couldn't retry read, failing it"); } pbp->bio_inbed++; if (pbp->bio_cmd == BIO_READ && pbp->bio_children == 2) { @@ -344,6 +351,7 @@ g_raid_tr_iodone_raid1(struct g_raid_tr_ * * XXX TODO */ + G_RAID_LOGREQ(3, bp, "Recovered data from other drive"); } if (pbp->bio_children == pbp->bio_inbed) { pbp->bio_completed = pbp->bio_length;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101112240.p0BMeIve040435>