* [PATCH] btrfs: tree-checker: Add DATA_RELOC tree to essential non-empty tree list
@ 2018-07-19 7:05 Qu Wenruo
2018-07-19 8:01 ` Su Yue
2018-07-19 9:27 ` David Sterba
0 siblings, 2 replies; 3+ messages in thread
From: Qu Wenruo @ 2018-07-19 7:05 UTC (permalink / raw)
To: linux-btrfs
DATA RELOC tree should also never be empty.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=200407
Reported-by: Xu Wen <wen.xu@gatech.edu>
Signed-off-by: Qu Wenruo <wqu@suse.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);
--
2.18.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] btrfs: tree-checker: Add DATA_RELOC tree to essential non-empty tree list
2018-07-19 7:05 [PATCH] btrfs: tree-checker: Add DATA_RELOC tree to essential non-empty tree list Qu Wenruo
@ 2018-07-19 8:01 ` Su Yue
2018-07-19 9:27 ` David Sterba
1 sibling, 0 replies; 3+ messages in thread
From: Su Yue @ 2018-07-19 8:01 UTC (permalink / raw)
To: Qu Wenruo, linux-btrfs
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.xu@gatech.edu>
> Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Su Yue <suy.fnst@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);
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] btrfs: tree-checker: Add DATA_RELOC tree to essential non-empty tree list
2018-07-19 7:05 [PATCH] btrfs: tree-checker: Add DATA_RELOC tree to essential non-empty tree list Qu Wenruo
2018-07-19 8:01 ` Su Yue
@ 2018-07-19 9:27 ` David Sterba
1 sibling, 0 replies; 3+ messages in thread
From: David Sterba @ 2018-07-19 9:27 UTC (permalink / raw)
To: Qu Wenruo; +Cc: linux-btrfs
On Thu, Jul 19, 2018 at 03:05:14PM +0800, 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.xu@gatech.edu>
> Signed-off-by: Qu Wenruo <wqu@suse.com>
> ---
> It's possible just fold this fix into commit "btrfs: tree-checker: Detect
> invalid empty essential tree".
Done, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-19 10:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-19 7:05 [PATCH] btrfs: tree-checker: Add DATA_RELOC tree to essential non-empty tree list Qu Wenruo
2018-07-19 8:01 ` Su Yue
2018-07-19 9:27 ` David Sterba
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.