From patchwork Mon Nov 14 18:43:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omar Sandoval X-Patchwork-Id: 9428233 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 A58E56047D for ; Mon, 14 Nov 2016 18:43:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 989FB28A66 for ; Mon, 14 Nov 2016 18:43:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8AE1628ABE; Mon, 14 Nov 2016 18:43:41 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 345CD28A92 for ; Mon, 14 Nov 2016 18:43:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932297AbcKNSnf (ORCPT ); Mon, 14 Nov 2016 13:43:35 -0500 Received: from mail-pg0-f42.google.com ([74.125.83.42]:36271 "EHLO mail-pg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932515AbcKNSnc (ORCPT ); Mon, 14 Nov 2016 13:43:32 -0500 Received: by mail-pg0-f42.google.com with SMTP id f188so56725360pgc.3 for ; Mon, 14 Nov 2016 10:43:32 -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=pkMzCz4GUm9uyxuWe7fA4bVVO7iA7sMqV0KYVdiTUHD/9p+7saqAyYYxm2NXhUFxdp L3pTqs7xjj4VuG5RBRW5mjCLQ7rcYBnylZ6kNMCW9HtKg/ry+AEoZl4sXuXhEvu7aKI/ P1RgoN0yxAFmUVF1vk18SZA+nN4ad2cZREtC4EZwoxYTJQ98sdeOrbqQVi6ZQ9D+aDF9 OeuAwGrZJ7UjNY2e/CgPn6naOhVU8SmJiiC0IKJuQTH0XD6jw4TqkXHFf7kjFNVC9WHo 0uzL+rLpJQaFADO5I/iJ7EvL0cUpqU+vmgkN2B4n/9iAHdnzuhHjIZYkg3I5z4jOctIr GrjA== 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=OFrAWwxMm873Af7emepbvN0pkyqf0It9OV5Bg6b7eToiIEWqvfBIVEcD2D0PcfC6i3 A/GpCoaSNpVOenBGDhfvm7gaen67xYKFRJnQ0RiqMTHeQsbkHg5pzA9xkNhb/EPjZYMl RZ6GJY2BF/XQsU6xUYKL6fDa4HLyj2z4pOjYvj/X0HnUS7EogeHy8R9qtlTbwaCxqDof x/HOPxuw6d0R/9X+NZ8k7kXLX27GKJUrQJmM+ppTbLHeqv8mdYp1uGPqfaajxBjAkG42 KwdxCELKAtgXiU7H5jF/4ofG7BsxnfVGm3giL3C0bZ4/d+Iv0Yx2vmz3sLF72YrU39OR Ocew== X-Gm-Message-State: ABUngvfFPQ7fsZARslGuNtEQLcoOtukWTuOTN2+KY5xKWwMZMdLUPFP/QPn03izkCtCfdoss X-Received: by 10.98.81.70 with SMTP id f67mr38070012pfb.179.1479149011919; Mon, 14 Nov 2016 10:43:31 -0800 (PST) Received: from vader.thefacebook.com ([2620:10d:c090:200::a:38b9]) by smtp.gmail.com with ESMTPSA id v76sm15488481pfk.77.2016.11.14.10.43.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Nov 2016 10:43:31 -0800 (PST) From: Omar Sandoval To: linux-btrfs@vger.kernel.org Cc: kernel-team@fb.com Subject: [PATCH v2 1/6] btrfs-progs: add the FREE_SPACE_TREE_VALID compat_ro bit definition Date: Mon, 14 Nov 2016 10:43:18 -0800 Message-Id: <74f83b8e9fbe48feff8fc0339bd7327f89f5cb6b.1479148594.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 \