ddf multiple-array support patch

"Darrick J. Wong" <[email protected]>
Newsgroups gmane.linux.ataraid
Organization IBM LTC
Message-ID <[email protected]>
Hello,

Apparently my 2410SA controller can be tricked into writing garbage
virtual drive configuration records for nonexistent arrays(!)  These
bogus config records can be detected by the lack of an entry for them in
the virtual drive list and be ignored by dmraid.

Trouble is, dmraid's ddf support doesn't ignore the bogus entries and
segfaults.  This patch teaches it how to do this, though it's based off
the tree before the ddf code was split up.  I can rebase it, though it's
nearly a one-liner.

Heinz: I couldn't get your 7/21 patch to apply to my rc11 tarball.
Would you mind sending me a snapshot of your latest tree?

--D

_______________________________________________
Ataraid-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/ataraid-list
mdisk_ignore_ghost_vds.patch (text/x-patch, 655 B)
--- v12-mdisk6.2/lib/format/ataraid/ddf1.c	2006-07-12 09:34:15.000000000 -0700
+++ v12-mdisk6.3/lib/format/ataraid/ddf1.c	2006-07-27 10:44:09.000000000 -0700
@@ -1191,6 +1191,15 @@ static struct raid_set *group_rd(struct 
 		rd->sectors = get_size(lc, ddf1, cr, pd);
 
 		rd->name = name(lc, ddf1, rd);
+		/*
+		 * If we have a virtual drive config without an entry in the
+		 * list of virtual drives, we ignore it.  Weird bug seen on
+		 * Adaptec 2410SA controller.
+		 */
+		if (!rd->name) {
+			free_raid_dev(lc, &rd);
+			continue;
+		}
 
 		/* Stuff it into the appropriate raid set. */
 		if (!(rs = find_or_alloc_raid_set(lc, rd->name, FIND_ALL,
signature.asc (application/pgp-signature, 191 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEyQARa6vRYYgWQuURAkS6AJ4nsxr41ZfPt/9mAOw3qEd52UOxVgCdFM5I
+zkIQ2qiPxQDFs0HnPab3ac=
=fv/Z
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.