On 17/10/2018 16.14, Daniel Kiper wrote: > On Thu, Oct 11, 2018 at 08:51:01PM +0200, Goffredo Baroncelli wrote: >> From: Goffredo Baroncelli <kreij...@inwind.it> >> >> Add support for recovery for a RAID 5 btrfs profile. In addition >> it is added some code as preparatory work for RAID 6 recovery code. >> >> Signed-off-by: Goffredo Baroncelli <kreij...@inwind.it> >> --- [...]
>> + >> + for (failed_devices = 0, i = 0; i < nstripes; i++) >> + { >> + struct grub_btrfs_chunk_stripe *stripe; >> + grub_disk_addr_t paddr; >> + grub_device_t dev; >> + grub_err_t err; >> + >> + /* after the struct grub_btrfs_chunk_item, there is an array of >> + struct grub_btrfs_chunk_stripe */ > > /* Struct grub_btrfs_chunk_stripe lives behind struct grub_btrfs_chunk_item. > */ What about /* The struct grub_btrfs_chunk_stripe array lives behind struct grub_btrfs_chunk_item. */ [...] >> @@ -921,17 +1061,29 @@ grub_btrfs_read_logical (struct grub_btrfs_data >> *data, grub_disk_addr_t addr, >> grub_dprintf ("btrfs", "reading laddr 0x%" PRIxGRUB_UINT64_T "\n", >> addr); >> >> - for (i = 0; i < redundancy; i++) >> + if (!is_raid56) > > Why not "if (is_raid56)"? I asked about that earlier. Please change > this if and of course code below. It will be much easier to read. And > you do not need curly brackets for for loop after else. Frankly speaking I don't see any problem having a if (!...). However I update the code as your request, hoping to speedup this patch set [...] -- gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it> Key fingerprint BBF5 1610 0B64 DAC6 5F7D 17B2 0EDA 9B37 8B82 E0B5 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel