From: Vladimir 'phcoder' Serbinenko Date: Thu, 10 Nov 2011 07:09:33 +0000 (+0100) Subject: * grub-core/fs/btrfs.c (grub_btrfs_read_logical): Fix RAID10 logic for X-Git-Tag: 2.00~987 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6b68db81fc42ed6a4b9aa7f15f5578136c383980;p=thirdparty%2Fgrub.git * grub-core/fs/btrfs.c (grub_btrfs_read_logical): Fix RAID10 logic for >= 6 drives. --- diff --git a/ChangeLog b/ChangeLog index 7cd370c1b..506036d5a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-11-10 Vladimir Serbinenko + + * grub-core/fs/btrfs.c (grub_btrfs_read_logical): Fix RAID10 logic for + >= 6 drives. + 2011-11-10 Vladimir Serbinenko * include/grub/i386/netbsd_bootinfo.h (grub_netbsd_btinfo_bootwedge): diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c index e5aa3084c..fae9199a4 100644 --- a/grub-core/fs/btrfs.c +++ b/grub-core/fs/btrfs.c @@ -734,12 +734,11 @@ grub_btrfs_read_logical (struct grub_btrfs_data *data, grub_disk_addr_t addr, &low); high = grub_divmod64 (middle, - grub_le_to_cpu16 (chunk->nsubstripes), + grub_le_to_cpu16 (chunk->nstripes) + / grub_le_to_cpu16 (chunk->nsubstripes), &stripen); - stripen *= grub_le_to_cpu16 (chunk->nstripes) - / grub_le_to_cpu16 (chunk->nsubstripes); - redundancy = grub_le_to_cpu16 (chunk->nstripes) - / grub_le_to_cpu16 (chunk->nsubstripes); + stripen *= grub_le_to_cpu16 (chunk->nsubstripes); + redundancy = grub_le_to_cpu16 (chunk->nsubstripes); stripe_offset = low + grub_le_to_cpu64 (chunk->stripe_length) * high; csize = grub_le_to_cpu64 (chunk->stripe_length) - low;