svn commit: r219659 - projects/graid/head/sys/geom/raid
Alexander Motin
mav at FreeBSD.org
Tue Mar 15 06:53:34 UTC 2011
Author: mav
Date: Tue Mar 15 06:53:33 2011
New Revision: 219659
URL: http://svn.freebsd.org/changeset/base/219659
Log:
Prefer to use CONCAT transformation module for any array with only one disk.
AMD/ATI RAID BIOS for some reason writes RAIDREADY disk as 1-disk RAID0,
not as JBOD. Not sure Promise BIOS does the same to just map it at MD.
1-disk RAID0 is also works fine, but CONCAT is more efficient there.
Modified:
projects/graid/head/sys/geom/raid/tr_concat.c
Modified: projects/graid/head/sys/geom/raid/tr_concat.c
==============================================================================
--- projects/graid/head/sys/geom/raid/tr_concat.c Tue Mar 15 06:07:02 2011 (r219658)
+++ projects/graid/head/sys/geom/raid/tr_concat.c Tue Mar 15 06:53:33 2011 (r219659)
@@ -73,7 +73,7 @@ static struct g_raid_tr_class g_raid_tr_
"CONCAT",
g_raid_tr_concat_methods,
sizeof(struct g_raid_tr_concat_object),
- .trc_priority = 100
+ .trc_priority = 50
};
static int
@@ -83,7 +83,9 @@ g_raid_tr_taste_concat(struct g_raid_tr_
trs = (struct g_raid_tr_concat_object *)tr;
if (tr->tro_volume->v_raid_level != G_RAID_VOLUME_RL_SINGLE &&
- tr->tro_volume->v_raid_level != G_RAID_VOLUME_RL_CONCAT)
+ tr->tro_volume->v_raid_level != G_RAID_VOLUME_RL_CONCAT &&
+ !(tr->tro_volume->v_disks_count == 1 &&
+ tr->tro_volume->v_raid_level != G_RAID_VOLUME_RL_UNKNOWN))
return (G_RAID_TR_TASTE_FAIL);
trs->trso_starting = 1;
return (G_RAID_TR_TASTE_SUCCEED);
More information about the svn-src-projects
mailing list