Received: from list by lists.gnu.org with archive (Exim 4.71) id 1fPY8h-0004FD-MA for mharc-grub-devel@gnu.org; Sun, 03 Jun 2018 14:54:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPY8c-0004AV-7C for grub-devel@gnu.org; Sun, 03 Jun 2018 14:53:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPY8Y-0008T8-7f for grub-devel@gnu.org; Sun, 03 Jun 2018 14:53:58 -0400 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]:55486) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPY8Y-0008SZ-0o for grub-devel@gnu.org; Sun, 03 Jun 2018 14:53:54 -0400 Received: by mail-wm0-x231.google.com with SMTP id v16-v6so4919502wmh.5 for ; Sun, 03 Jun 2018 11:53:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=DQDPe2eJhy0PPAyQSt1JBz18Onb22CoN/LGA6hWK8S0=; b=k9a7uFw7GqMskSVseaAcv5BaYjYctaGkFM4+itMtW3DjDogob/TZbpyb/MMaLjVIkD k+czVtxVYv3bZG1Tmgw+hZpVd9pemoS+4lO8osx5UsqGfPrAmQJeHOFy7eH0rnFQsmBY 0hWh6IpZks/O/XrwnJxbphtOQCquIG0QW+xs1G/Rx3HYgZlhpZ6x5dLiP/cydQZD/c/S 1/OnuSPxxiiPO9qEExvZbd8EZz8/Rh+TeJO1ISv0igfLLO7Kv/L5l3A1E3bYfg2P7VOO pgb1VUCiWaejtn417kDUftrcKXdFgpm6VZ7xduxFi3XLRZal5XV25WewrXQ9yS76W5+5 n18w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=DQDPe2eJhy0PPAyQSt1JBz18Onb22CoN/LGA6hWK8S0=; b=VdKj1q88Bdg0Ebkm5JG0fwwtrW6tKEPhyXoot9p0Nr6ngcc2t3usq7yC6yDVnmQoU8 v3wG91c4YfzbI5YOi5wdex/O8umMhQnNBs/pmm6S1Q4XFbjtrPsalXlXXrmTvGcfuK91 lT7BvkcKOd9U0SjMbMCzOP/Tu7Ef0k2++RdY1kScMEtFEW/2M3Q94KWi1BalUzRVm4rK uRHX4nAL86uzwbylB0UJrScH9CclUF7w27Bv3lhHH2zHa++x+feNa9nikAKkDICMdwbB U4S3Mu9dZ/0O2gl0EXiRHXsYbcUmHcjTszbB/kvigGslzHdMA3mgfFUx9u1UOpPQaOyb mw8A== X-Gm-Message-State: APt69E1+epz5oLO6z3SN0L2XRBa2oTxqWY+X9sXEy1czny++fU7Sp4kv ChC5r/5EoI7qnmQVZWMeMQ0uow== X-Google-Smtp-Source: ADUXVKKBOCj+hkvcK8sUTphx7EcnvuIbA0R60Gqfa6mzbgKVNmbf6szwAE53GhrWQ64JwlLpA3uWmA== X-Received: by 2002:a1c:903:: with SMTP id 3-v6mr1365196wmj.130.1528052032398; Sun, 03 Jun 2018 11:53:52 -0700 (PDT) Received: from venice.bhome (84-223-211-96.adsl-wholesale.clienti.tiscali.it. [84.223.211.96]) by smtp.gmail.com with ESMTPSA id b124-v6sm1279940wmf.11.2018.06.03.11.53.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Jun 2018 11:53:51 -0700 (PDT) From: Goffredo Baroncelli X-Google-Original-From: Goffredo Baroncelli To: grub-devel@gnu.org Subject: [PATCH V5] Add support for BTRFS raid5/6 to GRUB Date: Sun, 3 Jun 2018 20:53:39 +0200 Message-Id: <20180603185348.1780-1-kreijack@inwind.it> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::231 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2018 18:53:59 -0000 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 BR G.Baroncelli -- gpg @keyserver.linux.it: Goffredo Baroncelli Key fingerprint BBF5 1610 0B64 DAC6 5F7D 17B2 0EDA 9B37 8B82 E0B5