[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH V9] Add support for BTRFS raid5/6 to GRUB
From: |
Goffredo Baroncelli |
Subject: |
[PATCH V9] Add support for BTRFS raid5/6 to GRUB |
Date: |
Thu, 11 Oct 2018 20:50:54 +0200 |
Hi All,
the aim of this patches set is to provide support for a BTRFS raid5/6
filesystem in GRUB.
The first patch, implements the basic support for raid5/6. I.e this works when
all the disks are present.
The next 5 patches, are preparatory ones.
The 7th patch implements the raid5 recovery for btrfs (i.e. handling the
disappearing of 1 disk).
The 8th patch makes the code for handling the raid6 recovery more generic.
The last one implements the raid6 recovery for btrfs (i.e. handling the
disappearing up to two disks).
I tested the code in grub-emu, and it works both with all the disks,
and with some disks missing. I checked the crc32 calculated from grub and
from linux and these matched. Finally I checked if the support for md raid6
still works properly, and it does (with all drives and with up to 2 drives
missing)
Comments are welcome.
Changelog
v1: initial support for btrfs raid5/6. No recovery allowed
v2: full support for btrfs raid5/6. Recovery allowed
v3: some minor cleanup suggested by Daniel Kiper; reusing the
original raid6 recovery code of grub
v4: Several spell fix; better description of the RAID layout
in btrfs, and the variables which describes the stripe
positioning; split the patch #5 in two (#5 and #6)
v5: Several spell fix; improved code comment in patch #1, small
clean up in the code
v6: Small cleanup; improved the wording in the RAID6 layout
description; in the function raid6_recover_read_buffer() avoid
a unnecessary memcpy in case of invalid data;
v7: - patch 2,3,5,6,8 received an Review-by Daniel, and were unchanged from
the last time (only minor cleanup in the commit description requested by
Daniel)
- patch 7 received some small update rearranging a for(), and some
bracket around if()
- patch 4, received an update message which explains better why NULL
is stored in data->devices_attached[]
- patch 9, received a blank line to separate better a code line from
a previous comment. A description of 'parities_pos' was added
- patch 1, received a major update about the variable meaning description
in the comment. However I suspect that we need some further review to reach
a fully agreement about this text. NB: the update are relate only to
comments
v8: - patch 2,5,6,8 received an Review-by Daniel, and were unchanged from
the last time (only minor cleanup in the commit description requested by
Daniel)
- patch 1 received some adjustement to the variables description due to
the different terminology between BTRFS and other RAID implementatio.
Added a description for the "nparities" variable.
- patch 3 removed some unnecessary curly brackets (change request by Daniel)
- patch 4 received an improved commit description about why and how
the function find_device() is changed
- patch 7 received an update which transforms a i = 0; while(i..) i++; in
for( i = 0..... ; i++);
- patch 9 received an update to the comment
v9: - patch 1: update comments
- patch 4: update commit messages
- patch 7: added a comment about accessing an array of structs
after another structs; changed if(err == GRUB_ERR_NONE) in if(!err)
changed if(err != GRUB_ERR_NONE) in if(err)
BR
G.Baroncelli
--
gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it>
Key fingerprint BBF5 1610 0B64 DAC6 5F7D 17B2 0EDA 9B37 8B82 E0B5
- [PATCH V9] Add support for BTRFS raid5/6 to GRUB,
Goffredo Baroncelli <=
- [PATCH 2/9] btrfs: Add helper to check the btrfs header., Goffredo Baroncelli, 2018/10/11
- [PATCH 4/9] btrfs: Avoid a rescan for a device which was already not found., Goffredo Baroncelli, 2018/10/11
- [PATCH 3/9] btrfs: Move the error logging from find_device() to its caller., Goffredo Baroncelli, 2018/10/11
- [PATCH 5/9] btrfs: Move logging code in grub_btrfs_read_logical(), Goffredo Baroncelli, 2018/10/11
- [PATCH 1/9] btrfs: Add support for reading a filesystem with a RAID 5 or RAID 6 profile., Goffredo Baroncelli, 2018/10/11
- [PATCH 6/9] btrfs: Refactor the code that read from disk, Goffredo Baroncelli, 2018/10/11
- [PATCH 8/9] btrfs: Make more generic the code for RAID 6 rebuilding, Goffredo Baroncelli, 2018/10/11
- [PATCH 7/9] btrfs: Add support for recovery for a RAID 5 btrfs profiles., Goffredo Baroncelli, 2018/10/11