Received: from list by lists.gnu.org with archive (Exim 4.71) id 1fJ1TZ-0000Bo-Ap for mharc-grub-devel@gnu.org; Wed, 16 May 2018 14:48:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJ1TT-00007i-SD for grub-devel@gnu.org; Wed, 16 May 2018 14:48:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fJ1TP-0006tG-5b for grub-devel@gnu.org; Wed, 16 May 2018 14:48:31 -0400 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]:55986) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fJ1TO-0006ss-Un for grub-devel@gnu.org; Wed, 16 May 2018 14:48:27 -0400 Received: by mail-wm0-x235.google.com with SMTP id a8-v6so3826929wmg.5 for ; Wed, 16 May 2018 11:48:26 -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=j7sFJdSICp/+KObhNpDaT8YMlb7Yd0SmZAF7Xgasi/A=; b=pPzJwS/aXFJIDy3sbKZ3w/4aicIXzPN2S8aRCvdqMFmmVCQZYNu4ubUPdTRASOcDvF kH5SiAxDrEeQ4fBX4M3Rcfu/DEujHFDXwdM86aCs1MLgnCQUyuqKLITLvmJepnSwCCfb +VtpkYr15hXtEZO+lNGL9Hb0vXkeDz9XsgCBDgfwf38fXIf2wsoLitgfe6CqVv3XVO9B s0bXnsxbeCvsKYe/f5hB1N3A92GEM43Ov+MXXFWbTEe5jPYfAizgLLIFNKCUh+2/WL+o 5f0bRuENavSbhGTwKeYIexWEJeAdxAxhSBjoQnZkKmiam0eCsCEGSbm09RP96ofIbtA8 ro3Q== 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=j7sFJdSICp/+KObhNpDaT8YMlb7Yd0SmZAF7Xgasi/A=; b=IUCW7uZdKoaIMj9tfUVzS4RJIhiwrSsUkA7CG3RJ1xRFFnYVyzKAzFDUSUvcuv8uoh 5m4WBNSEkC4GVAoDxHnrjMIEcepUfax6SSs8270UqvVD0uZAOlJUw8hFoYdI86uyv6PR ejzMjnx0o3Da+rAbIxLZZn7Bi6yD0SvbKDSV5NWdlFdn4faHaTOE5ZAkaBCq8NrLeW8H tdIWq5j2QydaEr/QSwFeSS6twAjcXkHdglw5UaXhvE+wYXhNE8ffFkz09z6YHaM7HEfd t8gOHv15cgWAdIyzDHKOJxQmgP02rMVRghRX+JsZy5KPTykhU+VCVKsayuwcw516RdGZ heug== X-Gm-Message-State: ALKqPwdiLlMPuMf9fivn1DwCXT54ZjKU23lHooMlSx4ik8m8pRjYUclh zSNqSLgnCOHR2x8i7Y76P5ctPw== X-Google-Smtp-Source: AB8JxZojuHtLyt149UYC+ozXSJNE8Iy08O6nci7Ye4X+RGnyqfDpy/9iuN249Peyhuebj9Qn20jJnQ== X-Received: by 2002:a1c:e384:: with SMTP id a126-v6mr1631755wmh.93.1526496504943; Wed, 16 May 2018 11:48:24 -0700 (PDT) Received: from venice.bhome (94-38-2-55.adsl-ull.clienti.tiscali.it. [94.38.2.55]) by smtp.gmail.com with ESMTPSA id d17-v6sm3797129wrc.0.2018.05.16.11.48.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 May 2018 11:48:23 -0700 (PDT) From: Goffredo Baroncelli X-Google-Original-From: Goffredo Baroncelli To: grub-devel@gnu.org Subject: [PATCH V4] Add support for BTRFS raid5/6 to GRUB Date: Wed, 16 May 2018 20:48:10 +0200 Message-Id: <20180516184819.23736-1-kreijack@inwind.it> X-Mailer: git-send-email 2.17.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::235 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: Wed, 16 May 2018 18:48:33 -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 (for me) 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 the 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) BR G.Baroncelli-- gpg @keyserver.linux.it: Goffredo Baroncelli Key fingerprint BBF5 1610 0B64 DAC6 5F7D 17B2 0EDA 9B37 8B82 E0B5