From patchwork Sun Nov 13 19:35:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omar Sandoval X-Patchwork-Id: 9424917 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2316A60233 for ; Sun, 13 Nov 2016 19:42:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0FE73288AF for ; Sun, 13 Nov 2016 19:42:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 04DC7288E7; Sun, 13 Nov 2016 19:42:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29BDB288EA for ; Sun, 13 Nov 2016 19:42:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934869AbcKMTmV (ORCPT ); Sun, 13 Nov 2016 14:42:21 -0500 Received: from mail-pg0-f46.google.com ([74.125.83.46]:34625 "EHLO mail-pg0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934841AbcKMTmT (ORCPT ); Sun, 13 Nov 2016 14:42:19 -0500 Received: by mail-pg0-f46.google.com with SMTP id x23so41510539pgx.1 for ; Sun, 13 Nov 2016 11:42:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osandov-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=LBfEYJwVWR4PqIH04NmlaoJPUsS9P+7S4GRpKOlYzQ4=; b=aqD/QB0YKzzbERNKhr4tDvhfbYE/P4IR+xQrqPfdWvK7Uakh1uuv5nIkk8pvLTa/Ii 6Lgm6sYi74fVMfoMnLa/HN8r5orpXPDVvQOeK8shAIFdm+dEOBDbHTW284v7oty7un/a My1WQ/5NlMlm3oUjeBD4Do80USTXiN0rijmFjJNGn6graVwvcORsBp1MxwJ3Vg6jL7Ue t/+2yEHd9Sn/LQSWX04BC4BCwd6d6Ixwjto760TfmzMYivFXVkkwQOOuYYAI/Eh9ifAI O6konT8pTkWOSM018Zou0g/0Dup4vmSdO6YXJstZLcgxhTrJVABWrF1GilqM+iFCoyYG HLaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=LBfEYJwVWR4PqIH04NmlaoJPUsS9P+7S4GRpKOlYzQ4=; b=bVw5jThP5C9bHM53yGKtAM9W1/PGsHdtpGAeYAisaU4m64z2kqhA3beUW2Tvn3/NYD KH0A3D9p/Nnk3TAVeYMk7AOdPdi9R41T3HtPsfQii99rQQYAzq6lVnRRX63lBbjW5wRH avfHPAJWiEtBWYzyDm/B9z/1OGHTjyq2Ku7x8rq2hxO/Ddef2QKhMkqd70bzRZk6mpCS ISA/4xRemnfyqHmzOwPPtcUu7rFSwz0tTz1Q9b6P40v61BLAC1/PUST1KZsrMIjuyZmq 4kom9Aa40GlUimnuuCCJbz68yhXlVFL7DqTnjqgEcbCk0V0Lez/dtJh5cNyEYWC9VYMF grlQ== X-Gm-Message-State: ABUngvcwvpEdeNmcTZ6uyBQVS0DW7lUa8Tzw8ntjMo6DJg86sIs3eopAY794tYC5Zy1oixV7 X-Received: by 10.99.221.5 with SMTP id t5mr22793623pgg.122.1479065733894; Sun, 13 Nov 2016 11:35:33 -0800 (PST) Received: from localhost.localdomain ([2601:602:8801:8110:1a5e:fff:fea7:e0ef]) by smtp.gmail.com with ESMTPSA id v76sm8289029pfk.77.2016.11.13.11.35.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 13 Nov 2016 11:35:33 -0800 (PST) From: Omar Sandoval To: linux-btrfs@vger.kernel.org Cc: kernel-team@fb.com Subject: [PATCH 1/6] btrfs-progs: add the FREE_SPACE_TREE_VALID compat_ro bit definition Date: Sun, 13 Nov 2016 11:35:19 -0800 Message-Id: <74f83b8e9fbe48feff8fc0339bd7327f89f5cb6b.1479064970.git.osandov@fb.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: References: In-Reply-To: References: Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Omar Sandoval This is just the definition; we don't support it yet. Signed-off-by: Omar Sandoval --- ctree.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ctree.h b/ctree.h index d47f0ae..d67b852 100644 --- a/ctree.h +++ b/ctree.h @@ -467,6 +467,14 @@ struct btrfs_super_block { * ones specified below then we will fail to mount */ #define BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE (1ULL << 0) +/* + * Older kernels on big-endian systems produced broken free space tree bitmaps, + * and btrfs-progs also used to corrupt the free space tree. If this bit is + * clear, then the free space tree cannot be trusted. btrfs-progs can also + * intentionally clear this bit to ask the kernel to rebuild the free space + * tree. + */ +#define BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE_VALID (1ULL << 1) #define BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF (1ULL << 0) #define BTRFS_FEATURE_INCOMPAT_DEFAULT_SUBVOL (1ULL << 1) @@ -493,6 +501,11 @@ struct btrfs_super_block { #define BTRFS_FEATURE_COMPAT_SUPP 0ULL +/* + * The FREE_SPACE_TREE and FREE_SPACE_TREE_VALID compat_ro bits must not be + * added here until read-write support for the free space tree is implemented in + * btrfs-progs. + */ #define BTRFS_FEATURE_COMPAT_RO_SUPP 0ULL #define BTRFS_FEATURE_INCOMPAT_SUPP \