]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/fs/btrfs.c (grub_btrfs_read_logical): Fix RAID10 logic for
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 10 Nov 2011 07:09:33 +0000 (08:09 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 10 Nov 2011 07:09:33 +0000 (08:09 +0100)
>= 6 drives.

ChangeLog
grub-core/fs/btrfs.c

index 7cd370c1bfa2203f781e57fba09c20419cd1a681..506036d5addfbd409bb7427b162ca5839e2c8ead 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-11-10  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/fs/btrfs.c (grub_btrfs_read_logical): Fix RAID10 logic for
+       >= 6 drives.
+
 2011-11-10  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * include/grub/i386/netbsd_bootinfo.h (grub_netbsd_btinfo_bootwedge):
index e5aa3084ce9604942de07ba41eb3501d14177925..fae9199a46ed7d9edb14da045811e67c1832cc52 100644 (file)
@@ -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;