On 07/19/2018 03:05 PM, Qu Wenruo wrote:
DATA RELOC tree should also never be empty. Link: https://bugzilla.kernel.org/show_bug.cgi?id=200407 Reported-by: Xu Wen <wen...@gatech.edu> Signed-off-by: Qu Wenruo <w...@suse.com>
Reviewed-by: Su Yue <suy.f...@cn.fujitsu.com>
--- It's possible just fold this fix into commit "btrfs: tree-checker: Detect invalid empty essential tree". And for the test image, it can already be rejected by misc-next branch by the enhanced dev-extent checker. --- fs/btrfs/tree-checker.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c index 4c82a628df85..db835635372f 100644 --- a/fs/btrfs/tree-checker.c +++ b/fs/btrfs/tree-checker.c @@ -504,7 +504,8 @@ static int check_leaf(struct btrfs_fs_info *fs_info, struct extent_buffer *leaf, owner == BTRFS_CHUNK_TREE_OBJECTID || owner == BTRFS_EXTENT_TREE_OBJECTID || owner == BTRFS_DEV_TREE_OBJECTID || - owner == BTRFS_FS_TREE_OBJECTID) { + owner == BTRFS_FS_TREE_OBJECTID || + owner == BTRFS_DATA_RELOC_TREE_OBJECTID) { generic_err(fs_info, leaf, 0, "invalid root, root %llu must never be empty", owner);
-- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html