svn commit: r255564 - stable/9/sys/geom/raid

Alexander Motin mav at FreeBSD.org
Sat Sep 14 10:10:02 UTC 2013


Author: mav
Date: Sat Sep 14 10:10:01 2013
New Revision: 255564
URL: http://svnweb.freebsd.org/changeset/base/255564

Log:
  MFC r254269, r254271:
  Fix reasonable but safe Clang warnings.

Modified:
  stable/9/sys/geom/raid/tr_raid5.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/geom/raid/tr_raid5.c
==============================================================================
--- stable/9/sys/geom/raid/tr_raid5.c	Sat Sep 14 10:08:09 2013	(r255563)
+++ stable/9/sys/geom/raid/tr_raid5.c	Sat Sep 14 10:10:01 2013	(r255564)
@@ -106,7 +106,8 @@ g_raid_tr_taste_raid5(struct g_raid_tr_o
 	trs = (struct g_raid_tr_raid5_object *)tr;
 	qual = tr->tro_volume->v_raid_level_qualifier;
 	if (tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID4 &&
-	    qual >= 0 && qual <= 1) {
+	    (qual == G_RAID_VOLUME_RLQ_R4P0 ||
+	     qual == G_RAID_VOLUME_RLQ_R4PN)) {
 		/* RAID4 */
 	} else if ((tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID5 ||
 	     tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID5E ||
@@ -114,7 +115,10 @@ g_raid_tr_taste_raid5(struct g_raid_tr_o
 	     tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID5R ||
 	     tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID6 ||
 	     tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAIDMDF) &&
-	    qual >= 0 && qual <= 3) {
+	    (qual == G_RAID_VOLUME_RLQ_R5RA ||
+	     qual == G_RAID_VOLUME_RLQ_R5RS ||
+	     qual == G_RAID_VOLUME_RLQ_R5LA ||
+	     qual == G_RAID_VOLUME_RLQ_R5LS)) {
 		/* RAID5/5E/5EE/5R/6/MDF */
 	} else
 		return (G_RAID_TR_TASTE_FAIL);


More information about the svn-src-stable-9 mailing list