svn commit: r218380 - projects/graid/head/sys/geom/raid
Alexander Motin
mav at FreeBSD.org
Sun Feb 6 21:31:29 UTC 2011
Author: mav
Date: Sun Feb 6 21:31:28 2011
New Revision: 218380
URL: http://svn.freebsd.org/changeset/base/218380
Log:
RAID0 doesn't really need to know what event for subdisk came from metadata
layer. New state is all it needs to know.
Modified:
projects/graid/head/sys/geom/raid/tr_raid0.c
Modified: projects/graid/head/sys/geom/raid/tr_raid0.c
==============================================================================
--- projects/graid/head/sys/geom/raid/tr_raid0.c Sun Feb 6 20:11:24 2011 (r218379)
+++ projects/graid/head/sys/geom/raid/tr_raid0.c Sun Feb 6 21:31:28 2011 (r218380)
@@ -137,19 +137,15 @@ g_raid_tr_event_raid0(struct g_raid_tr_o
trs = (struct g_raid_tr_raid0_object *)tr;
vol = tr->tro_volume;
sc = vol->v_softc;
- if (event == G_RAID_SUBDISK_E_NEW) {
- state = sd->sd_state;
- if (state != G_RAID_SUBDISK_S_NONE &&
- state != G_RAID_SUBDISK_S_FAILED &&
- state != G_RAID_SUBDISK_S_ACTIVE)
- g_raid_change_subdisk_state(sd, G_RAID_SUBDISK_S_ACTIVE);
- if (state != sd->sd_state &&
- !trs->trso_starting && !trs->trso_stopped)
- g_raid_write_metadata(sc, vol, sd, NULL);
- } else if (event == G_RAID_SUBDISK_E_FAILED) {
-// g_raid_change_subdisk_state(sd, G_RAID_SUBDISK_S_FAILED);
- } else
- g_raid_change_subdisk_state(sd, G_RAID_SUBDISK_S_NONE);
+
+ state = sd->sd_state;
+ if (state != G_RAID_SUBDISK_S_NONE &&
+ state != G_RAID_SUBDISK_S_FAILED &&
+ state != G_RAID_SUBDISK_S_ACTIVE)
+ g_raid_change_subdisk_state(sd, G_RAID_SUBDISK_S_ACTIVE);
+ if (state != sd->sd_state &&
+ !trs->trso_starting && !trs->trso_stopped)
+ g_raid_write_metadata(sc, vol, sd, NULL);
g_raid_tr_update_state_raid0(vol);
return (0);
}
More information about the svn-src-projects
mailing list