From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KOA1S-0004Mk-Pp for mharc-grub-devel@gnu.org; Wed, 30 Jul 2008 07:39:14 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KOA1Q-0004Ly-Bs for grub-devel@gnu.org; Wed, 30 Jul 2008 07:39:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KOA1O-0004K7-Si for grub-devel@gnu.org; Wed, 30 Jul 2008 07:39:11 -0400 Received: from [199.232.76.173] (port=47526 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KOA1O-0004K4-Lh for grub-devel@gnu.org; Wed, 30 Jul 2008 07:39:10 -0400 Received: from moutng.kundenserver.de ([212.227.126.186]:56429) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KOA1O-00029q-Tn for grub-devel@gnu.org; Wed, 30 Jul 2008 07:39:11 -0400 Received: from [85.180.34.54] (e180034054.adsl.alicedsl.de [85.180.34.54]) by mrelayeu.kundenserver.de (node=mrelayeu8) with ESMTP (Nemesis) id 0ML31I-1KOA1M32Q0-0000dA; Wed, 30 Jul 2008 13:39:09 +0200 From: Felix Zielcke To: The development of GRUB 2 In-Reply-To: <20080730103708.GA17771@thorin> References: <1217286307.4016.107.camel@fz-deb.local> <20080730103708.GA17771@thorin> Content-Type: text/plain Date: Wed, 30 Jul 2008 13:39:10 +0200 Message-Id: <1217417950.6234.6.camel@fz-deb.local> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1/5PZ5ZvRa4HyEFr9L+zwPseCTSUS46hsWVyC9 L0xzEcWBTLIwbjbC0McS977VXBa2ei0hGKxix8dZ64egctpx+j aHmxJ5SDQOGfQUx6C3kpA2lbTy7iAEK X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) Subject: Re: [PATCH] show an error instead of segfaulting on grub-probe -t partmap on a unsynced raid X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jul 2008 11:39:12 -0000 I have told this all Robert just on IRC, but it would be really nice if others would comment on this problem too :) I just don't know if GRUB_UTIL should ignore the missing devices just like real GRUB or if it's a good idea to at least warn the user that sth. is wrong with the mdraid. Am Mittwoch, den 30.07.2008, 12:37 +0200 schrieb Robert Millan: > We generate that list ourselves (I think in util/raid.c), so if one device > is linked in the list but just points to NULL that's our own fault, at least > up to the util/raid.c layer. > The list is generated by grub_raid_memberlist at disk/raid.c:72 and that doestn't handle missing devices, it adds every disk to the list for (i = 0; i < array->total_devs; i++) { tmp = grub_malloc (sizeof (*tmp)); tmp->disk = array->device[i]; tmp->next = list; list = tmp; } grub_raid_read for raid1 can handle missing devices without problems disk/raid.c:209 for (i = 0; i < array->total_devs; i++) { if (array->device[i]) This is from grub_raid_scan_device after hd0,1 is added sdb1 / hd1,1 has been removed and --zero-superblock'ed (gdb) print *array $3 = {number = 0, version = 0, level = 1, layout = 0, total_devs = 1, nr_devs = 1, chunk_size = 0, uuid = {1191940856, 3853190239, 1276382316, 2567164211}, name = 0x19e1230 "md0", disk_size = 16777216, device = {0x0, 0x19e1080, 0x0 }, next = 0x0}