svn commit: r216981 - projects/graid/head/sys/geom/raid
Warner Losh
imp at FreeBSD.org
Tue Jan 4 22:50:28 UTC 2011
Author: imp
Date: Tue Jan 4 22:50:28 2011
New Revision: 216981
URL: http://svn.freebsd.org/changeset/base/216981
Log:
Use only 24 bytes to accomidate the SATA label. Intel doesn't do SAS
drives for this kind of raid, so no need to waste stack in case we see
a SAS drive with the intel metadata on it.
Reviewed by: mav@
Modified:
projects/graid/head/sys/geom/raid/md_intel.c
Modified: projects/graid/head/sys/geom/raid/md_intel.c
==============================================================================
--- projects/graid/head/sys/geom/raid/md_intel.c Tue Jan 4 22:47:42 2011 (r216980)
+++ projects/graid/head/sys/geom/raid/md_intel.c Tue Jan 4 22:50:28 2011 (r216981)
@@ -608,14 +608,14 @@ g_raid_md_create_intel(struct g_raid_md_
* ataraid(7) code always uses the last 16 characters of the label to
* store into the Intel meta format. Generalize this to N characters
* since that's easy. Labels can be up to 20 characters for SATA drives
- * and up 251 characters for SAS drives. Allocate a little extra to be
- * safe.
+ * and up 251 characters for SAS drives. Since intel controllers don't
+ * support SAS drives, just stick with the SATA limits for stack friendliness.
*/
static int
g_raid_md_get_label(struct g_consumer *cp, char *serial, int serlen)
{
- char serial_buffer[256];
+ char serial_buffer[24];
int len, error;
len = sizeof(serial_buffer);
More information about the svn-src-projects
mailing list