Message ID | B8A1E13A-A60F-428D-AA1F-71890BD758EE@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Apr 28, 2017 at 11:51:21AM +0200, Christophe de Dinechin wrote: > Since we memset tmpl, max_size==0. This does not seem consistent with nr = 1. > In check_extent_refs, we will call: > > set_extent_dirty(root->fs_info->excluded_extents, > rec->start, > rec->start + rec->max_size - 1); > > This ends up with BUG_ON(end < start) in insert_state. > > Signed-off-by: Christophe de Dinechin <dinechin@redhat.com> Applied. Thanks for debugging the issue! -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/cmds-check.c b/cmds-check.c index c13f900..d5e2966 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -6193,6 +6193,7 @@ static int add_tree_backref(struct cache_tree *extent_cache, u64 bytenr, tmpl.start = bytenr; tmpl.nr = 1; tmpl.metadata = 1; + tmpl.max_size = 1; ret = add_extent_rec_nolookup(extent_cache, &tmpl); if (ret)
Since we memset tmpl, max_size==0. This does not seem consistent with nr = 1. In check_extent_refs, we will call: set_extent_dirty(root->fs_info->excluded_extents, rec->start, rec->start + rec->max_size - 1); This ends up with BUG_ON(end < start) in insert_state. Signed-off-by: Christophe de Dinechin <dinechin@redhat.com> --- cmds-check.c | 1 + 1 file changed, 1 insertion(+)