Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Feb 2011 16:41:06 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r218491 - projects/graid/head/sys/geom/raid
Message-ID:  <201102091641.p19Gf6SU090647@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Wed Feb  9 16:41:06 2011
New Revision: 218491
URL: http://svn.freebsd.org/changeset/base/218491

Log:
  Fix typo introduced at r218459 and making recovered read return error if
  remap write failed.

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	Wed Feb  9 16:37:29 2011	(r218490)
+++ projects/graid/head/sys/geom/raid/tr_raid1.c	Wed Feb  9 16:41:06 2011	(r218491)
@@ -852,7 +852,7 @@ rebuild_round_done:
 			cbp = g_clone_bio(pbp);
 			if (cbp == NULL)
 				break;
-			G_RAID_LOGREQ(2, cbp, "Retrying read");
+			G_RAID_LOGREQ(2, cbp, "Retrying read from %d", i);
 			if (pbp->bio_children == 2 && do_write) {
 				sd->sd_recovery++;
 				cbp->bio_caller1 = nsd;
@@ -893,7 +893,7 @@ rebuild_round_done:
 		if (cbp != NULL) {
 			cbp->bio_cmd = BIO_WRITE;
 			cbp->bio_cflags = G_RAID_BIO_FLAG_REMAP;
-			G_RAID_LOGREQ(3, cbp,
+			G_RAID_LOGREQ(2, cbp,
 			    "Attempting bad sector remap on failing drive.");
 			g_raid_subdisk_iostart(pbp->bio_driver1, cbp);
 			return;
@@ -909,7 +909,7 @@ rebuild_round_done:
 		 * it now.  However, we need to reset error to 0 in that case
 		 * because we're not failing the original I/O which succeeded.
 		 */
-		if (pbp->bio_cmd == BIO_WRITE && bp->bio_error) {
+		if (bp->bio_cmd == BIO_WRITE && bp->bio_error) {
 			G_RAID_LOGREQ(0, bp, "Remap write failed: "
 			    "failing subdisk.");
 			g_raid_tr_raid1_fail_disk(sd->sd_softc, sd, sd->sd_disk);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102091641.p19Gf6SU090647>