Re: [PATCH V10] Add support for BTRFS raid5/6 to GRUB

2018-10-31 Thread Goffredo Baroncelli
On 31/10/2018 13.06, Daniel Kiper wrote: [...] > > v11 pushed. > > Goffredo, thank you for doing the work. Great ! Many thanks for your support !! > > Nick, you can go ahead and rebase yours patchset. > > Daniel > BR G.Baroncelli -- gpg @keyserver.linux.i

[PATCH 1/9] btrfs: Add support for reading a filesystem with a RAID 5 or RAID 6 profile.

2018-10-22 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Signed-off-by: Goffredo Baroncelli Signed-off-by: Daniel Kiper Reviewed-by: Daniel Kiper --- grub-core/fs/btrfs.c | 73 1 file changed, 73 insertions(+) diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c index

[PATCH 9/9] btrfs: Add RAID 6 recovery for a btrfs filesystem.

2018-10-22 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Add the RAID 6 recovery, in order to use a RAID 6 filesystem even if some disks (up to two) are missing. This code use the md RAID 6 code already present in grub. Signed-off-by: Goffredo Baroncelli Reviewed-by: Daniel Kiper --- grub-core/fs/btrfs.c | 60

[PATCH 7/9] btrfs: Add support for recovery for a RAID 5 btrfs profiles.

2018-10-22 Thread Goffredo Baroncelli
From: Goffredo Baroncelli 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 Reviewed-by: Daniel Kiper --- grub-core/fs/btrfs.c | 159

[PATCH 6/9] btrfs: Refactor the code that read from disk

2018-10-22 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Move the code in charge to read the data from disk into a separate function. This helps to separate the error handling logic (which depends on the different raid profiles) from the read from disk logic. Refactoring this code increases the general readability too. This

[PATCH 3/9] btrfs: Move the error logging from find_device() to its caller.

2018-10-22 Thread Goffredo Baroncelli
From: Goffredo Baroncelli The caller knows better if this error is fatal or not, i.e. another disk is available or not. This is a preparatory patch. Signed-off-by: Goffredo Baroncelli Reviewed-by: Daniel Kiper --- grub-core/fs/btrfs.c | 10 -- 1 file changed, 4 insertions(+), 6

[PATCH 8/9] btrfs: Make more generic the code for RAID 6 rebuilding

2018-10-22 Thread Goffredo Baroncelli
From: Goffredo Baroncelli The original code which handles the recovery of a RAID 6 disks array assumes that all reads are multiple of 1 << GRUB_DISK_SECTOR_BITS and it assumes that all the I/O is done via the struct grub_diskfilter_segment. This is not true for the btrfs code. In order to

[PATCH 4/9] btrfs: Avoid a rescan for a device which was already not found.

2018-10-22 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Currently read from missing device triggers rescan. However, it is never recorded that the device is missing. So, each read of a missing device triggers rescan again and again. This behavior causes a lot of unneeded rescans leading to huge slowdowns. This patch fixes

Re: [PATCH V10] Add support for BTRFS raid5/6 to GRUB

2018-10-22 Thread Goffredo Baroncelli
On 22/10/2018 13.02, Daniel Kiper wrote: > On Thu, Oct 18, 2018 at 07:55:32PM +0200, Goffredo Baroncelli wrote: >> >> Hi All, >> >> the aim of this patches set is to provide support for a BTRFS raid5/6 >> filesystem in GRUB. [...] > > In general whol

[PATCH 5/9] btrfs: Move logging code in grub_btrfs_read_logical()

2018-10-22 Thread Goffredo Baroncelli
From: Goffredo Baroncelli A portion of the logging code is moved outside of internal for(;;). The part that is left inside is the one which depends on the internal for(;;) index. This is a preparatory patch. The next one will refactor the code inside the for(;;) into an another function

[PATCH V11] Add support for BTRFS raid5/6 to GRUB

2018-10-22 Thread Goffredo Baroncelli
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 fo

[PATCH 2/9] btrfs: Add helper to check the btrfs header.

2018-10-22 Thread Goffredo Baroncelli
From: Goffredo Baroncelli This helper is used in a few places to help the debugging. As conservative approach the error is only logged. This does not impact the error handling. Signed-off-by: Goffredo Baroncelli Reviewed-by: Daniel Kiper --- grub-core/fs/btrfs.c | 24

[PATCH 7/9] btrfs: Add support for recovery for a RAID 5 btrfs profiles.

2018-10-18 Thread Goffredo Baroncelli
From: Goffredo Baroncelli 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 --- grub-core/fs/btrfs.c | 161 +-- 1 file changed, 156

[PATCH 8/9] btrfs: Make more generic the code for RAID 6 rebuilding

2018-10-18 Thread Goffredo Baroncelli
From: Goffredo Baroncelli The original code which handles the recovery of a RAID 6 disks array assumes that all reads are multiple of 1 << GRUB_DISK_SECTOR_BITS and it assumes that all the I/O is done via the struct grub_diskfilter_segment. This is not true for the btrfs code. In order to

[PATCH 4/9] btrfs: Avoid a rescan for a device which was already not found.

2018-10-18 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Currently read from missing device triggers rescan. However, it is never recorded that the device is missing. So, each read of a missing device triggers rescan again and again. This behavior causes a lot of unneeded rescans leading to huge slowdowns. This patch fixes

[PATCH V10] Add support for BTRFS raid5/6 to GRUB

2018-10-18 Thread Goffredo Baroncelli
'(' - patch 9: update the wording in the comment; s/raid6/RAID 6/ in grub_dprintf() BR G.Baroncelli -- gpg @keyserver.linux.it: Goffredo Baroncelli Key fingerprint BBF5 1610 0B64 DAC6 5F7D 17B2 0EDA 9B37 8B82 E0B5 ___ Grub-d

[PATCH 6/9] btrfs: Refactor the code that read from disk

2018-10-18 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Move the code in charge to read the data from disk into a separate function. This helps to separate the error handling logic (which depends on the different raid profiles) from the read from disk logic. Refactoring this code increases the general readability too. This

[PATCH 2/9] btrfs: Add helper to check the btrfs header.

2018-10-18 Thread Goffredo Baroncelli
From: Goffredo Baroncelli This helper is used in a few places to help the debugging. As conservative approach the error is only logged. This does not impact the error handling. Signed-off-by: Goffredo Baroncelli Reviewed-by: Daniel Kiper --- grub-core/fs/btrfs.c | 24

[PATCH 5/9] btrfs: Move logging code in grub_btrfs_read_logical()

2018-10-18 Thread Goffredo Baroncelli
From: Goffredo Baroncelli A portion of the logging code is moved outside of internal for(;;). The part that is left inside is the one which depends on the internal for(;;) index. This is a preparatory patch. The next one will refactor the code inside the for(;;) into an another function

[PATCH 9/9] btrfs: Add RAID 6 recovery for a btrfs filesystem.

2018-10-18 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Add the RAID 6 recovery, in order to use a RAID 6 filesystem even if some disks (up to two) are missing. This code use the md RAID 6 code already present in grub. Signed-off-by: Goffredo Baroncelli Reviewed-by: Daniel Kiper --- grub-core/fs/btrfs.c | 60

[PATCH 1/9] btrfs: Add support for reading a filesystem with a RAID 5 or RAID 6 profile.

2018-10-18 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Signed-off-by: Goffredo Baroncelli Signed-off-by: Daniel Kiper Reviewed-by: Daniel Kiper --- grub-core/fs/btrfs.c | 73 1 file changed, 73 insertions(+) diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c index

[PATCH 3/9] btrfs: Move the error logging from find_device() to its caller.

2018-10-18 Thread Goffredo Baroncelli
From: Goffredo Baroncelli The caller knows better if this error is fatal or not, i.e. another disk is available or not. This is a preparatory patch. Signed-off-by: Goffredo Baroncelli Reviewed-by: Daniel Kiper --- grub-core/fs/btrfs.c | 10 -- 1 file changed, 4 insertions(+), 6

Re: [PATCH 7/9] btrfs: Add support for recovery for a RAID 5 btrfs profiles.

2018-10-17 Thread Goffredo Baroncelli
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 >> >> Add support for recovery for a RAID 5 btrfs profile. In addition >> it is added some code as preparatory work for RAID 6

[PATCH 9/9] btrfs: Add RAID 6 recovery for a btrfs filesystem.

2018-10-11 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Add the RAID 6 recovery, in order to use a RAID 6 filesystem even if some disks (up to two) are missing. This code use the md RAID 6 code already present in grub. Signed-off-by: Goffredo Baroncelli Reviewed-by: Daniel Kiper --- grub-core/fs/btrfs.c | 60

[PATCH 6/9] btrfs: Refactor the code that read from disk

2018-10-11 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Move the code in charge to read the data from disk into a separate function. This helps to separate the error handling logic (which depends on the different raid profiles) from the read from disk logic. Refactoring this code increases the general readability too. This

[PATCH 5/9] btrfs: Move logging code in grub_btrfs_read_logical()

2018-10-11 Thread Goffredo Baroncelli
From: Goffredo Baroncelli A portion of the logging code is moved outside of internal for(;;). The part that is left inside is the one which depends on the internal for(;;) index. This is a preparatory patch. The next one will refactor the code inside the for(;;) into an another function

[PATCH V9] Add support for BTRFS raid5/6 to GRUB

2018-10-11 Thread Goffredo Baroncelli
BR G.Baroncelli -- gpg @keyserver.linux.it: Goffredo Baroncelli 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

[PATCH 8/9] btrfs: Make more generic the code for RAID 6 rebuilding

2018-10-11 Thread Goffredo Baroncelli
From: Goffredo Baroncelli The original code which handles the recovery of a RAID 6 disks array assumes that all reads are multiple of 1 << GRUB_DISK_SECTOR_BITS and it assumes that all the I/O is done via the struct grub_diskfilter_segment. This is not true for the btrfs code. In order to

[PATCH 1/9] btrfs: Add support for reading a filesystem with a RAID 5 or RAID 6 profile.

2018-10-11 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Signed-off-by: Goffredo Baroncelli Signed-off-by: Daniel Kiper --- grub-core/fs/btrfs.c | 73 1 file changed, 73 insertions(+) diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c index be195448d..933a57d3b 100644

[PATCH 7/9] btrfs: Add support for recovery for a RAID 5 btrfs profiles.

2018-10-11 Thread Goffredo Baroncelli
From: Goffredo Baroncelli 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 --- grub-core/fs/btrfs.c | 162 +-- 1 file changed, 157

[PATCH 4/9] btrfs: Avoid a rescan for a device which was already not found.

2018-10-11 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Currently read from missing device triggers rescan. However, it is never recorded that the device is missing. So, each read of a missing device triggers rescan again and again. This behavior causes a lot of unneeded rescans leading to huge slowdowns. This patch fixes

[PATCH 3/9] btrfs: Move the error logging from find_device() to its caller.

2018-10-11 Thread Goffredo Baroncelli
From: Goffredo Baroncelli The caller knows better if this error is fatal or not, i.e. another disk is available or not. This is a preparatory patch. Signed-off-by: Goffredo Baroncelli Reviewed-by: Daniel Kiper --- grub-core/fs/btrfs.c | 10 -- 1 file changed, 4 insertions(+), 6

[PATCH 2/9] btrfs: Add helper to check the btrfs header.

2018-10-11 Thread Goffredo Baroncelli
From: Goffredo Baroncelli This helper is used in a few places to help the debugging. As conservative approach the error is only logged. This does not impact the error handling. Signed-off-by: Goffredo Baroncelli Reviewed-by: Daniel Kiper --- grub-core/fs/btrfs.c | 24

Re: [PATCH 7/9] btrfs: Add support for recovery for a RAID 5 btrfs profiles.

2018-10-10 Thread Goffredo Baroncelli
On 09/10/2018 20.20, Daniel Kiper wrote: > On Thu, Sep 27, 2018 at 08:35:02PM +0200, Goffredo Baroncelli wrote: >> From: Goffredo Baroncelli >> >> Add support for recovery for a RAID 5 btrfs profile. In addition >> it is added some code as preparatory work for RAID 6

[PATCH 9/9] btrfs: Add RAID 6 recovery for a btrfs filesystem.

2018-09-27 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Add the RAID 6 recovery, in order to use a RAID 6 filesystem even if some disks (up to two) are missing. This code use the md RAID 6 code already present in grub. Signed-off-by: Goffredo Baroncelli --- grub-core/fs/btrfs.c | 63

[PATCH 3/9] btrfs: Move the error logging from find_device() to its caller.

2018-09-27 Thread Goffredo Baroncelli
From: Goffredo Baroncelli The caller knows better if this error is fatal or not, i.e. another disk is available or not. This is a preparatory patch. Signed-off-by: Goffredo Baroncelli Reviewed-by: Daniel Kiper --- grub-core/fs/btrfs.c | 10 -- 1 file changed, 4 insertions(+), 6

[PATCH 2/9] btrfs: Add helper to check the btrfs header.

2018-09-27 Thread Goffredo Baroncelli
From: Goffredo Baroncelli This helper is used in a few places to help the debugging. As conservative approach the error is only logged. This does not impact the error handling. Signed-off-by: Goffredo Baroncelli Reviewed-by: Daniel Kiper --- grub-core/fs/btrfs.c | 24

[PATCH 8/9] btrfs: Make more generic the code for RAID 6 rebuilding

2018-09-27 Thread Goffredo Baroncelli
From: Goffredo Baroncelli The original code which handles the recovery of a RAID 6 disks array assumes that all reads are multiple of 1 << GRUB_DISK_SECTOR_BITS and it assumes that all the I/O is done via the struct grub_diskfilter_segment. This is not true for the btrfs code. In order to

[PATCH 7/9] btrfs: Add support for recovery for a RAID 5 btrfs profiles.

2018-09-27 Thread Goffredo Baroncelli
From: Goffredo Baroncelli 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 --- grub-core/fs/btrfs.c | 160 +-- 1 file changed, 155

[PATCH 5/9] btrfs: Move logging code in grub_btrfs_read_logical()

2018-09-27 Thread Goffredo Baroncelli
From: Goffredo Baroncelli A portion of the logging code is moved outside of internal for(;;). The part that is left inside is the one which depends on the internal for(;;) index. This is a preparatory patch. The next one will refactor the code inside the for(;;) into an another function

[PATCH 4/9] btrfs: Avoid a rescan for a device which was already not found.

2018-09-27 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Change the behavior of find_device(): before the patch, a read of a missed device may trigger a rescan. However, it is never recorded that a device is missed, so each single read of a missed device may triggers a rescan. It is the caller who decides if a rescan is

[PATCH 6/9] btrfs: Refactor the code that read from disk

2018-09-27 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Move the code in charge to read the data from disk into a separate function. This helps to separate the error handling logic (which depends on the different raid profiles) from the read from disk logic. Refactoring this code increases the general readability too. This

[PATCH 1/9] btrfs: Add support for reading a filesystem with a RAID 5 or RAID 6 profile.

2018-09-27 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Signed-off-by: Goffredo Baroncelli --- grub-core/fs/btrfs.c | 74 1 file changed, 74 insertions(+) diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c index be195448d..9bc6d399d 100644 --- a/grub-core/fs/btrfs.c +++ b

[PATCH V8] Add support for BTRFS raid5/6 to GRUB

2018-09-27 Thread Goffredo Baroncelli
ceived an update to the comment BR G.Baroncelli -- gpg @keyserver.linux.it: Goffredo Baroncelli 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

Re: [PATCH 1/9] btrfs: Add support for reading a filesystem with a RAID 5 or RAID 6 profile.

2018-09-26 Thread Goffredo Baroncelli
On 25/09/2018 17.31, Daniel Kiper wrote: > On Wed, Sep 19, 2018 at 08:40:32PM +0200, Goffredo Baroncelli wrote: >> From: Goffredo Baroncelli >> >> Signed-off-by: Goffredo Baroncelli >> --- >> grub-core/fs/btrfs.c | 66 ++

Re: [PATCH 9/9] btrfs: Add RAID 6 recovery for a btrfs filesystem.

2018-09-26 Thread Goffredo Baroncelli
On 25/09/2018 21.20, Daniel Kiper wrote: > On Wed, Sep 19, 2018 at 08:40:40PM +0200, Goffredo Baroncelli wrote: >> From: Goffredo Baroncelli >> [] >> * - stripe_offset is the disk offset, >> * - csize is the "potential"

[PATCH 4/9] btrfs: Avoid a rescan for a device which was already not found.

2018-09-26 Thread Goffredo Baroncelli
On 25/09/2018 19.29, Daniel Kiper wrote: > On Wed, Sep 19, 2018 at 08:40:35PM +0200, Goffredo Baroncelli wrote: >> From: Goffredo Baroncelli >> >> If a device is not found, do not return immediately but >> record this failure by storing NULL in data->devices_a

[PATCH 7/9] btrfs: Add support for recovery for a RAID 5 btrfs profiles.

2018-09-26 Thread Goffredo Baroncelli
On 25/09/2018 21.10, Daniel Kiper wrote: > On Wed, Sep 19, 2018 at 08:40:38PM +0200, Goffredo Baroncelli wrote: >> From: Goffredo Baroncelli >> >> Add support for recovery for a RAID 5 btrfs profile. In addition >> it is added some code as preparatory work for RAID 6

Re: [PATCH 1/9] btrfs: Add support for reading a filesystem with a RAID 5 or RAID 6 profile.

2018-09-19 Thread Goffredo Baroncelli
Please ignore this email On 19/09/2018 20.36, Goffredo Baroncelli wrote: > From: Goffredo Baroncelli > > Signed-off-by: Goffredo Baroncelli > --- > grub-core/fs/btrfs.c | 66 > 1 file changed, 66 insertions(+) > > diff --gi

[PATCH 8/9] btrfs: Make more generic the code for RAID 6 rebuilding

2018-09-19 Thread Goffredo Baroncelli
From: Goffredo Baroncelli The original code which handles the recovery of a RAID 6 disks array assumes that all reads are multiple of 1 << GRUB_DISK_SECTOR_BITS and it assumes that all the I/O is done via the struct grub_diskfilter_segment. This is not true for the btrfs code. In order to

[PATCH 4/9] btrfs: Avoid a rescan for a device which was already not found.

2018-09-19 Thread Goffredo Baroncelli
From: Goffredo Baroncelli If a device is not found, do not return immediately but record this failure by storing NULL in data->devices_attached[]. This way we avoid unnecessary devices rescan, and speedup the reads in case of a degraded array. Signed-off-by: Goffredo Baroncelli --- grub-c

[PATCH 7/9] btrfs: Add support for recovery for a RAID 5 btrfs profiles.

2018-09-19 Thread Goffredo Baroncelli
From: Goffredo Baroncelli 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 --- grub-core/fs/btrfs.c | 169 +-- 1 file changed, 164

[PATCH 3/9] btrfs: Move the error logging from find_device() to its caller.

2018-09-19 Thread Goffredo Baroncelli
From: Goffredo Baroncelli The caller knows better if this error is fatal or not, i.e. another disk is available or not. This is a preparatory patch. Signed-off-by: Goffredo Baroncelli Reviewed-by: Daniel Kiper --- grub-core/fs/btrfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions

[PATCH 2/9] btrfs: Add helper to check the btrfs header.

2018-09-19 Thread Goffredo Baroncelli
From: Goffredo Baroncelli This helper is used in a few places to help the debugging. As conservative approach the error is only logged. This does not impact the error handling. Signed-off-by: Goffredo Baroncelli Reviewed-by: Daniel Kiper --- grub-core/fs/btrfs.c | 24

[PATCH 9/9] btrfs: Add RAID 6 recovery for a btrfs filesystem.

2018-09-19 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Add the RAID 6 recovery, in order to use a RAID 6 filesystem even if some disks (up to two) are missing. This code use the md RAID 6 code already present in grub. Signed-off-by: Goffredo Baroncelli --- grub-core/fs/btrfs.c | 54

[PATCH 6/9] btrfs: Refactor the code that read from disk

2018-09-19 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Move the code in charge to read the data from disk into a separate function. This helps to separate the error handling logic (which depends on the different raid profiles) from the read from disk logic. Refactoring this code increases the general readability too. This

[PATCH 5/9] btrfs: Move logging code in grub_btrfs_read_logical()

2018-09-19 Thread Goffredo Baroncelli
From: Goffredo Baroncelli A portion of the logging code is moved outside of internal for(;;). The part that is left inside is the one which depends on the internal for(;;) index. This is a preparatory patch. The next one will refactor the code inside the for(;;) into an another function

[PATCH 1/9] btrfs: Add support for reading a filesystem with a RAID 5 or RAID 6 profile.

2018-09-19 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Signed-off-by: Goffredo Baroncelli --- grub-core/fs/btrfs.c | 66 1 file changed, 66 insertions(+) diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c index be195448d..56c42746d 100644 --- a/grub-core/fs/btrfs.c +++ b

[PATCH V7] Add support for BTRFS raid5/6 to GRUB

2018-09-19 Thread Goffredo Baroncelli
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 BR G.Baroncelli -- gpg @keyserver.linux.it: Goffredo Baroncelli Key fingerprint BBF5 1610 0B64 DAC6 5F

[PATCH 1/9] btrfs: Add support for reading a filesystem with a RAID 5 or RAID 6 profile.

2018-09-19 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Signed-off-by: Goffredo Baroncelli --- grub-core/fs/btrfs.c | 66 1 file changed, 66 insertions(+) diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c index be195448d..56c42746d 100644 --- a/grub-core/fs/btrfs.c +++ b

[PATCH 4/9] btrfs: Avoid a rescan for a device which was already not found.

2018-07-18 Thread Goffredo Baroncelli
Resend because I forgot to put grub-devel in cc - On 07/12/2018 04:02 PM, Daniel Kiper wrote: > On Tue, Jun 19, 2018 at 08:22:19PM +0200, Goffredo Baroncelli wrote: >> Forward because this patch still doesn't reach th

[PATCH 1/9] btrfs: Add support for reading a filesystem with a RAID 5 or RAID 6 profile.

2018-07-17 Thread Goffredo Baroncelli
On 07/12/2018 03:46 PM, Daniel Kiper wrote: > On Tue, Jun 19, 2018 at 07:39:48PM +0200, Goffredo Baroncelli wrote: >> Signed-off-by: Goffredo Baroncelli >> --- >> grub-core/fs/btrfs.c | 70 >> 1 file changed, 70 insertions

Re: [PATCH 1/9] btrfs: Add support for reading a filesystem with a RAID 5 or RAID 6 profile.

2018-07-09 Thread Goffredo Baroncelli
On 07/09/2018 12:20 PM, Daniel Kiper wrote: > On Sun, Jul 08, 2018 at 05:51:37PM +0200, Goffredo Baroncelli wrote: >> A gentle ping. > > Sorry for delay. I remember about this patchset but I am swamped with other > stuff. > I will take a look at it this week. > &g

Re: [PATCH 1/9] btrfs: Add support for reading a filesystem with a RAID 5 or RAID 6 profile.

2018-07-08 Thread Goffredo Baroncelli
A gentle ping. BR G.Baroncelli On 06/19/2018 07:39 PM, Goffredo Baroncelli wrote: > Signed-off-by: Goffredo Baroncelli > --- > grub-core/fs/btrfs.c | 70 > 1 file changed, 70 insertions(+) > > diff --git a/grub-core/fs/btrf

[PATCH 4/9] btrfs: Avoid a rescan for a device which was already not found.

2018-06-19 Thread Goffredo Baroncelli
ed array. Signed-off-by: Goffredo Baroncelli --- grub-core/fs/btrfs.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c index 8d07e2d72..70bcb0fdc 100644 --- a/grub-core/fs/btrfs.c +++ b/grub-core/fs/btrfs.c @@ -588,

[PATCH 6/9] btrfs: Refactor the code that read from disk

2018-06-19 Thread Goffredo Baroncelli
help the adding of the RAID 5/6 recovery code. Signed-off-by: Goffredo Baroncelli --- grub-core/fs/btrfs.c | 75 ++-- 1 file changed, 44 insertions(+), 31 deletions(-) diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c index 15ed59151..fa5bf56e0 100644

[PATCH 7/9] btrfs: Add support for recovery for a RAID 5 btrfs profiles.

2018-06-19 Thread Goffredo Baroncelli
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 --- grub-core/fs/btrfs.c | 177 +-- 1 file changed, 172 insertions(+), 5 deletions

[PATCH 3/9] btrfs: Move the error logging from find_device() to its caller.

2018-06-19 Thread Goffredo Baroncelli
The caller knows better if this error is fatal or not, i.e. another disk is available or not. This is a preparatory patch. Signed-off-by: Goffredo Baroncelli --- grub-core/fs/btrfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/grub-core/fs/btrfs.c b/grub-core/fs

[PATCH 9/9] btrfs: Add RAID 6 recovery for a btrfs filesystem.

2018-06-19 Thread Goffredo Baroncelli
Add the RAID 6 recovery, in order to use a RAID 6 filesystem even if some disks (up to two) are missing. This code use the md RAID 6 code already present in grub. Signed-off-by: Goffredo Baroncelli --- grub-core/fs/btrfs.c | 51 ++-- 1 file changed, 45

[PATCH 8/9] btrfs: Make more generic the code for RAID 6 rebuilding

2018-06-19 Thread Goffredo Baroncelli
native grub_raid6_recover() code, it is modified to not call grub_diskfilter_read_node() directly, but to call an handler passed as an argument. Signed-off-by: Goffredo Baroncelli --- grub-core/disk/raid6_recover.c | 52 ++ include/grub/diskfilter.h | 9 ++ 2 files chang

[PATCH 1/9] btrfs: Add support for reading a filesystem with a RAID 5 or RAID 6 profile.

2018-06-19 Thread Goffredo Baroncelli
Signed-off-by: Goffredo Baroncelli --- grub-core/fs/btrfs.c | 70 1 file changed, 70 insertions(+) diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c index be195448d..fbabaebbe 100644 --- a/grub-core/fs/btrfs.c +++ b/grub-core/fs/btrfs.c

[PATCH V6] Add support for BTRFS raid5/6 to GRUB

2018-06-19 Thread Goffredo Baroncelli
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 fo

[PATCH 5/9] btrfs: Move logging code in grub_btrfs_read_logical()

2018-06-19 Thread Goffredo Baroncelli
A portion of the logging code is moved outside of internal for(;;). The part that is left inside is the one which depends on the internal for(;;) index. This is a preparatory patch. The next one will refactor the code inside the for(;;) into an another function. Signed-off-by: Goffredo

[PATCH 2/9] btrfs: Add helper to check the btrfs header.

2018-06-19 Thread Goffredo Baroncelli
This helper s used in a few places to help the debugging. As conservative approach the error is only logged. This to not impact the error handling. Signed-off-by: Goffredo Baroncelli --- grub-core/fs/btrfs.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff

Re: [PATCH 1/9] btrfs: Add support for reading a filesystem with a RAID 5 or RAID 6 profile.

2018-06-19 Thread Goffredo Baroncelli
On 06/14/2018 08:55 PM, Goffredo Baroncelli wrote: >>> + * - stripe_offset is the offset from the beginning of the chunk >>> + *disks physical address, >> I am not sure that I understand. Could clarify this? > - stripe_offset is the offset (in b

Re: [PATCH 7/9] btrfs: Add support for recovery for a RAID 5 btrfs profiles.

2018-06-18 Thread Goffredo Baroncelli
On 06/14/2018 09:05 PM, Goffredo Baroncelli wrote: >>> + >>> +cleanup: >> Space before the label please. >> I have asked about earlier. > The line before the label is already a space; Am I missing something I think that now I understand: are you requiring a spa

Re: [PATCH 7/9] btrfs: Add support for recovery for a RAID 5 btrfs profiles.

2018-06-14 Thread Goffredo Baroncelli
On 06/14/2018 03:03 PM, Daniel Kiper wrote: > On Sun, Jun 03, 2018 at 08:53:46PM +0200, Goffredo Baroncelli wrote: >> Add support for recovery fo a RAID 5 btrfs profile. In addition > > s/fo /for / > >> it is added some code as preparatory work for RAID 6 recovery c

Re: [PATCH 1/9] btrfs: Add support for reading a filesystem with a RAID 5 or RAID 6 profile.

2018-06-14 Thread Goffredo Baroncelli
On 06/14/2018 01:17 PM, Daniel Kiper wrote: > On Sun, Jun 03, 2018 at 08:53:40PM +0200, Goffredo Baroncelli wrote: >> Signed-off-by: Goffredo Baroncelli >> --- >> grub-core/fs/btrfs.c | 70 >> 1 file changed, 70 insertions

Re: Fwd: [PATCH 4/9] btrfs: Avoid a rescan for a device which was already not found.

2018-06-14 Thread Goffredo Baroncelli
On 06/14/2018 01:45 PM, Daniel Kiper wrote: > On Mon, Jun 04, 2018 at 09:26:06PM +0200, Goffredo Baroncelli wrote: >> Resend this patch because I am not sure that all received it. > > It looks that #4 is a bit unfortunate for you and/or patch series... :-))) Yes, but I have anoth

Re: [PATCH V5] Add support for BTRFS raid5/6 to GRUB

2018-06-14 Thread Goffredo Baroncelli
On 06/14/2018 03:21 PM, Daniel Kiper wrote: > Hi Goffredo, > > On Sun, Jun 03, 2018 at 08:53:39PM +0200, Goffredo Baroncelli wrote: >> >> Hi All, >> >> the aim of this patches set is to provide support for a BTRFS raid5/6 >> filesystem in GRUB. >> >

Fwd: [PATCH 4/9] btrfs: Avoid a rescan for a device which was already not found.

2018-06-04 Thread Goffredo Baroncelli
Resend this patch because I am not sure that all received it. BR G.Baroncelli Forwarded Message Subject: [PATCH 4/9] btrfs: Avoid a rescan for a device which was already not found. Date: Sun, 3 Jun 2018 20:53:43 +0200 From: Goffredo Baroncelli To: grub-devel@gnu.org CC

[PATCH 8/9] btrfs: Make more generic the code for RAID 6 rebuilding

2018-06-03 Thread Goffredo Baroncelli
native grub_raid6_recover() code, it is modified to not call grub_diskfilter_read_node() directly, but to call an handler passed as an argument. Signed-off-by: Goffredo Baroncelli --- grub-core/disk/raid6_recover.c | 52 ++ include/grub/diskfilter.h | 9 ++ 2 files chang

[PATCH 5/9] btrfs: Move logging code in grub_btrfs_read_logical()

2018-06-03 Thread Goffredo Baroncelli
: Goffredo Baroncelli --- grub-core/fs/btrfs.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c index b64b692f8..e2baed665 100644 --- a/grub-core/fs/btrfs.c +++ b/grub-core/fs/btrfs.c @@ -867,6 +867,18

[PATCH 7/9] btrfs: Add support for recovery for a RAID 5 btrfs profiles.

2018-06-03 Thread Goffredo Baroncelli
Add support for recovery fo 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 --- grub-core/fs/btrfs.c | 180 +-- 1 file changed, 175 insertions(+), 5 deletions

[PATCH 9/9] btrfs: Add RAID 6 recovery for a btrfs filesystem.

2018-06-03 Thread Goffredo Baroncelli
Add the RAID 6 recovery, in order to use a RAID 6 filesystem even if some disks (up to two) are missing. This code use the md RAID 6 code already present in grub. Signed-off-by: Goffredo Baroncelli --- grub-core/fs/btrfs.c | 50 ++-- 1 file changed, 44

[PATCH V5] Add support for BTRFS raid5/6 to GRUB

2018-06-03 Thread Goffredo Baroncelli
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 BR G.Baroncelli -- gpg @keyserver.linux.it: Goffredo Baroncelli Key fingerprint BBF5 1610 0B64 DAC6 5F7D 17B2 0EDA 9B37 8B82 E0B5

[PATCH 6/9] btrfs: Refactor the code that read from disk

2018-06-03 Thread Goffredo Baroncelli
the adding of the RAID 5/6 recovery code. Signed-off-by: Goffredo Baroncelli --- grub-core/fs/btrfs.c | 76 ++-- 1 file changed, 45 insertions(+), 31 deletions(-) diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c index e2baed665..9cdbfe792 100644

[PATCH 3/9] btrfs: Move the error logging from find_device() to its caller.

2018-06-03 Thread Goffredo Baroncelli
This is a preparatory patch. The caller knows better if this error is fatal or not, i.e. another disk is available or not. Signed-off-by: Goffredo Baroncelli --- grub-core/fs/btrfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/grub-core/fs/btrfs.c b/grub-core/fs

[PATCH 1/9] btrfs: Add support for reading a filesystem with a RAID 5 or RAID 6 profile.

2018-06-03 Thread Goffredo Baroncelli
Signed-off-by: Goffredo Baroncelli --- grub-core/fs/btrfs.c | 70 1 file changed, 70 insertions(+) diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c index be195448d..4d418859b 100644 --- a/grub-core/fs/btrfs.c +++ b/grub-core/fs/btrfs.c

[PATCH 2/9] btrfs: Add helper to check the btrfs header.

2018-06-03 Thread Goffredo Baroncelli
This helper will be used in a few places to help the debugging. As conservative approach, in case of error it is only logged. This is because I am not sure if this can change something in the error handling of the currently existing code. Signed-off-by: Goffredo Baroncelli --- grub-core/fs

Re: [PATCH 6/9] btrfs: refactor the code that read from disk

2018-06-01 Thread Goffredo Baroncelli
On 05/30/2018 01:07 PM, Daniel Kiper wrote: > On Wed, May 16, 2018 at 08:48:16PM +0200, Goffredo Baroncelli wrote: >> This is a preparatory patch, to help the adding of the RAID 5/6 recovery > > Please move "This is a preparatory patch" sentence below... > >> co

Re: [PATCH 8/9] btrfs: make more generic the code for RAID 6 rebuilding

2018-06-01 Thread Goffredo Baroncelli
On 05/30/2018 02:05 PM, Daniel Kiper wrote: > On Wed, May 16, 2018 at 08:48:18PM +0200, Goffredo Baroncelli wrote: >> The original code which handles the recovery of a RAID 6 disks array >> assumes that all reads are multiple of 1 << GRUB_DISK_SECTOR_BITS and it >> assum

Re: [PATCH 9/9] btrfs: add RAID 6 recovery for a btrfs filesystem.

2018-06-01 Thread Goffredo Baroncelli
On 05/30/2018 02:15 PM, Daniel Kiper wrote: > On Wed, May 16, 2018 at 08:48:19PM +0200, Goffredo Baroncelli wrote: >> Add the RAID 6 recovery, in order to use a RAID 6 filesystem even if some >> disks (up to two) are missing. This code use the old md RAID 6 code already > >

Re: [PATCH 1/9] btrfs: add support for reading a filesystem with a RAID 5 or RAID 6 profile.

2018-06-01 Thread Goffredo Baroncelli
Hi Daniel, my comments below On 05/30/2018 12:07 PM, Daniel Kiper wrote: > On Wed, May 16, 2018 at 08:48:11PM +0200, Goffredo Baroncelli wrote: >> Signed-off-by: Goffredo Baroncelli [...] >> + * off -> logical address to read (from the beginning of the >> +

Re: [PATCH 7/9] btrfs: add support for recovery for a RAID 5 btrfs profiles.

2018-06-01 Thread Goffredo Baroncelli
On 05/30/2018 01:30 PM, Daniel Kiper wrote: > On Wed, May 16, 2018 at 08:48:17PM +0200, Goffredo Baroncelli wrote: >> Signed-off-by: Goffredo Baroncelli >> --- >> grub-core/fs/btrfs.c | 174 ++- >> 1 file changed, 170

Re: [PATCH 1/8] Add support for reading a filesystem with a raid5 or raid6 profile.

2018-05-16 Thread Goffredo Baroncelli
On 05/14/2018 07:52 PM, Daniel Kiper wrote: > On Fri, May 11, 2018 at 09:24:39PM +0200, Goffredo Baroncelli wrote: >> Signed-off-by: Goffredo Baroncelli >> --- >> grub-core/fs/btrfs.c | 61 >> 1 file changed, 61 insertions

Re: [PATCH 8/8] Add raid6 recovery for a btrfs filesystem.

2018-05-16 Thread Goffredo Baroncelli
On 05/14/2018 09:06 PM, Daniel Kiper wrote: > On Fri, May 11, 2018 at 09:24:46PM +0200, Goffredo Baroncelli wrote: >> Add the raid6 recovery, in order to use a raid6 filesystem even if some >> disks (up to two) are missing. >> This code use the old md raid6 code al

[PATCH 5/9] btrfs: move logging code in grub_btrfs_read_logical()

2018-05-16 Thread Goffredo Baroncelli
A portion of the logging code is moved outside a for(;;). The part that is left inside is the one which depends by the for(;;) index. This is a preparatory patch: in the next one it will be possible to refactor the code inside the for(;;) in an another function. --- grub-core/fs/btrfs.c | 25 +

[PATCH 8/9] btrfs: make more generic the code for RAID 6 rebuilding

2018-05-16 Thread Goffredo Baroncelli
native grub_raid6_recover() code, it is modified to not call grub_diskfilter_read_node() directly, but to call an handler passed as argument. Signed-off-by: Goffredo Baroncelli --- grub-core/disk/raid6_recover.c | 53 ++ include/grub/diskfilter.h | 9 ++ 2 files chang

Re: [PATCH 6/8] Add support for recovery for a raid5 btrfs profiles.

2018-05-16 Thread Goffredo Baroncelli
On 05/14/2018 08:40 PM, Daniel Kiper wrote: > On Fri, May 11, 2018 at 09:24:44PM +0200, Goffredo Baroncelli wrote: >> Signed-off-by: Goffredo Baroncelli >> --- >> grub-core/fs/btrfs.c | 178 +-- >> 1 file changed, 173

  1   2   >