Date: Tue, 4 Jan 2011 22:50:28 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r216981 - projects/graid/head/sys/geom/raid Message-ID: <201101042250.p04MoSDi057449@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101042250.p04MoSDi057449>