Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: fix invalid assert in backref.c
@ 2017-09-28 20:55 Josef Bacik
  2017-09-29 16:59 ` David Sterba
  0 siblings, 1 reply; 2+ messages in thread
From: Josef Bacik @ 2017-09-28 20:55 UTC (permalink / raw)
  To: linux-btrfs, kernel-team, dsterba, jeffm

This should be verify'ing that we have an empty key, not that we have a
filled out key.

Signed-off-by: Josef Bacik <jbacik@fb.com>
---
Dave this is on top of your ext/jeffm/extent-cache branch and fixes the segfault
you reported.

 backref.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/backref.c b/backref.c
index 8fc0fae779f2..8615f6b8677a 100644
--- a/backref.c
+++ b/backref.c
@@ -465,7 +465,7 @@ static int __add_missing_keys(struct btrfs_fs_info *fs_info,
 
 		ASSERT(ref->root_id);
 		ASSERT(!ref->parent);
-		ASSERT(ref->key_for_search.type);
+		ASSERT(!ref->key_for_search.type);
 		BUG_ON(!ref->wanted_disk_byte);
 		eb = read_tree_block(fs_info, ref->wanted_disk_byte, 0);
 		if (!extent_buffer_uptodate(eb)) {
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] btrfs-progs: fix invalid assert in backref.c
  2017-09-28 20:55 [PATCH] btrfs-progs: fix invalid assert in backref.c Josef Bacik
@ 2017-09-29 16:59 ` David Sterba
  0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2017-09-29 16:59 UTC (permalink / raw)
  To: Josef Bacik; +Cc: linux-btrfs, kernel-team, dsterba, jeffm

On Thu, Sep 28, 2017 at 04:55:00PM -0400, Josef Bacik wrote:
> This should be verify'ing that we have an empty key, not that we have a
> filled out key.
> 
> Signed-off-by: Josef Bacik <jbacik@fb.com>
> ---
> Dave this is on top of your ext/jeffm/extent-cache branch and fixes the segfault
> you reported.

Great, thanks for the fix. I'll fold it to the original patch so the
branches remain bisectable.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-29 17:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-28 20:55 [PATCH] btrfs-progs: fix invalid assert in backref.c Josef Bacik
2017-09-29 16:59 ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox