From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KbBAC-0000Gg-PN for mharc-grub-devel@gnu.org; Thu, 04 Sep 2008 05:30:05 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KbBA8-0000Ev-SG for grub-devel@gnu.org; Thu, 04 Sep 2008 05:30:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KbBA7-0000EX-MO for grub-devel@gnu.org; Thu, 04 Sep 2008 05:29:59 -0400 Received: from [199.232.76.173] (port=56494 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KbBA7-0000EI-65 for grub-devel@gnu.org; Thu, 04 Sep 2008 05:29:59 -0400 Received: from moutng.kundenserver.de ([212.227.126.183]:58083) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KbBA6-0002fb-Ua for grub-devel@gnu.org; Thu, 04 Sep 2008 05:29:59 -0400 Received: from [85.180.61.73] (e180061073.adsl.alicedsl.de [85.180.61.73]) by mrelayeu.kundenserver.de (node=mrelayeu5) with ESMTP (Nemesis) id 0ML25U-1KbBA51cor-00060v; Thu, 04 Sep 2008 11:29:57 +0200 From: Felix Zielcke To: The development of GRUB 2 Content-Type: multipart/mixed; boundary="=-hJMlPN5qNKXzJ1w1LA/1" Date: Thu, 04 Sep 2008 11:29:56 +0200 Message-Id: <1220520596.4167.24.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 X-Provags-ID: V01U2FsdGVkX19yMUwIIOLFurKY79a0CJqntT2gfPNPdKejs+Z sIwl5nT7U6V1voUI54tbencFtcw2zZWfCBArCl0ObNd4+inn2U ytNIpbCNp8QJp5/J3Bd1y2N1uBu92qV X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) Subject: floating point exception in disk/raid.c:206 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: Thu, 04 Sep 2008 09:30:01 -0000 --=-hJMlPN5qNKXzJ1w1LA/1 Content-Type: text/plain Content-Transfer-Encoding: 7bit static grub_err_t grub_raid_read (grub_disk_t disk, grub_disk_addr_t sector, grub_size_t size, char *buf) case 0: case 1: case 10: { read_sector = grub_divmod64 (sector, array->chunk_size, &b); Bean, this is a bit wrong because array->chunk_size is 0 in the RAID 1 case and sector is 0 too in the case I got with gdb. The easiest fix would be probable to just set chunk_size to for example 64. Attached patch does it, but maybe you have a better/other idea? -- Felix Zielcke --=-hJMlPN5qNKXzJ1w1LA/1 Content-Disposition: attachment; filename=fpe.raid.diff Content-Type: text/x-patch; name=fpe.raid.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit 2008-09-04 Felix Zielcke * disk/mdraid_linux.c (grub_mdraid_detect): Set `array->chunk_size' to 64 for RAID level 1. * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Likewise. Index: disk/mdraid_linux.c =================================================================== --- disk/mdraid_linux.c (Revision 1849) +++ disk/mdraid_linux.c (Arbeitskopie) @@ -200,7 +200,7 @@ grub_mdraid_detect (grub_disk_t disk, st array->layout = sb.layout; array->total_devs = sb.raid_disks; array->disk_size = (sb.size) ? sb.size * 2 : sector; - array->chunk_size = sb.chunk_size >> 9; + array->chunk_size = (sb.level == 1) ? 64 : sb.chunk_size >> 9; array->index = sb.this_disk.number; array->uuid_len = 16; array->uuid = grub_malloc (16); Index: disk/dmraid_nvidia.c =================================================================== --- disk/dmraid_nvidia.c (Revision 1849) +++ disk/dmraid_nvidia.c (Arbeitskopie) @@ -135,7 +135,7 @@ grub_dmraid_nv_detect (grub_disk_t disk, array->number = 0; array->total_devs = sb.array.total_volumes; - array->chunk_size = sb.array.stripe_block_size; + array->chunk_size = (array->level == 1) ? 64 : sb.array.stripe_block_size; array->index = sb.unit_number; array->uuid_len = sizeof (sb.array.signature); array->uuid = grub_malloc (sizeof (sb.array.signature)); --=-hJMlPN5qNKXzJ1w1LA/1--