Re: grubenv on md, Btrfs, LUKS, etc

2018-09-27 Thread Chris Murphy
On Thu, Sep 27, 2018 at 10:38 AM, Daniel Kiper wrote: > On Wed, Sep 26, 2018 at 04:45:51PM -0600, Chris Murphy wrote: >> On Fri, Sep 21, 2018 at 12:35 PM, Daniel Kiper wrote: >> > On Tue, Sep 18, 2018 at 01:40:06PM -0600, Chris Murphy wrote: >> >> On Mon, Sep 17, 2018 at 10:59 PM, Chris Murphy

Re: efinet SNP issue affects iscsi boot

2018-09-27 Thread Micah Parrish
On Thu, Sep 27, 2018 at 06:15:45PM +0800, Michael Chang wrote: I have posted the RFC patch to the list. If you don't see it please let me know. I will give it a try, thanks! I also read through the efinet.c from OpenSolaris.? It is quite different from the current SNP efinet.c, since it u

[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 delet

[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 reuse t

[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 inse

[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. Signed

[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 perfor

[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 i

[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
i 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

Re: [PATCH v3] Makefile.am: Add `all_video` to `default_payload.elf`

2018-09-27 Thread Daniel Kiper
On Wed, Sep 19, 2018 at 06:12:18PM +0200, Daniel Kiper wrote: > On Thu, Sep 06, 2018 at 03:21:24PM +0200, Daniel Kiper wrote: > > On Thu, Sep 06, 2018 at 03:07:57PM +0200, Vladimir 'phcoder' Serbinenko > > wrote: > > > Unfortunately this pulls in some problematic graphics drivers that > > > should

Re: grubenv on md, Btrfs, LUKS, etc

2018-09-27 Thread Daniel Kiper
On Wed, Sep 26, 2018 at 04:45:51PM -0600, Chris Murphy wrote: > On Fri, Sep 21, 2018 at 12:35 PM, Daniel Kiper wrote: > > On Tue, Sep 18, 2018 at 01:40:06PM -0600, Chris Murphy wrote: > >> On Mon, Sep 17, 2018 at 10:59 PM, Chris Murphy > >> wrote: > >> > Hi, > >> > > >> > GRUB code can certainly

Re: efinet SNP issue affects iscsi boot

2018-09-27 Thread Daniel Kiper
On Thu, Sep 27, 2018 at 06:15:45PM +0800, Michael Chang wrote: > On Thu, Sep 20, 2018 at 02:01:08PM +0200, Daniel Kiper wrote: > > On Thu, Sep 20, 2018 at 06:38:07PM +0800, Michael Chang wrote: > > > On Thu, Sep 13, 2018 at 06:06:15PM -0600, Micah Parrish wrote: > > > > Hi, new subscriber here.? We

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

2018-09-27 Thread Daniel Kiper
On Wed, Sep 26, 2018 at 09:56:07PM +0200, Goffredo Baroncelli wrote: > 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, > >>

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

2018-09-27 Thread Daniel Kiper
On Wed, Sep 26, 2018 at 09:55:57PM +0200, Goffredo Baroncelli wrote: > 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

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

2018-09-27 Thread Daniel Kiper
On Wed, Sep 26, 2018 at 09:55:54PM +0200, Goffredo Baroncelli wrote: > 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

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

2018-09-27 Thread Daniel Kiper
On Wed, Sep 26, 2018 at 10:40:32PM +0200, Goffredo Baroncelli wrote: > 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

Re: efinet SNP issue affects iscsi boot

2018-09-27 Thread Michael Chang
On Thu, Sep 20, 2018 at 01:26:47PM -0600, Micah Parrish wrote: > > > On 09/20/2018 07:47 AM, grub-devel-requ...@gnu.org wrote: > > On Thu, Sep 20, 2018 at 06:38:07PM +0800, Michael Chang wrote: > > > On Thu, Sep 13, 2018 at 06:06:15PM -0600, Micah Parrish wrote: > > > > Hi, new subscriber here.?

Re: efinet SNP issue affects iscsi boot

2018-09-27 Thread Michael Chang
On Thu, Sep 20, 2018 at 02:01:08PM +0200, Daniel Kiper wrote: > On Thu, Sep 20, 2018 at 06:38:07PM +0800, Michael Chang wrote: > > On Thu, Sep 13, 2018 at 06:06:15PM -0600, Micah Parrish wrote: > > > Hi, new subscriber here.? We have a problem with Grub 2 and its use of SNP > > > instead of MNP.? O

[RFC] efinet: default to MNP interface and SNP as fallback

2018-09-27 Thread Michael Chang
By far grub is using exclusive Simple Network Protocol (SNP) access and can effectively kill all running Managed Network Protocol (MNP) instance on the same NIC. The approach is not working reliably and new problem is reported every now and then. Here I'm trying to make a summary for known problems