Skip to content
Commit b0175117 authored by Josef Bacik's avatar Josef Bacik
Browse files

Btrfs: fix panic when recovering tree log



A user reported a BUG_ON(ret) that occured during tree log replay.  Ret was
-EAGAIN, so what I think happened is that we removed an extent that covered
a bitmap entry and an extent entry.  We remove the part from the bitmap and
return -EAGAIN and then search for the next piece we want to remove, which
happens to be an entire extent entry, so we just free the sucker and return.
The problem is ret is still set to -EAGAIN so we trip the BUG_ON().  The
user used btrfs-zero-log so I'm not 100% sure this is what happened so I've
added a WARN_ON() to catch the other possibility.  Thanks,

Reported-by: default avatarJan Steffens <jan.steffens@gmail.com>
Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
parent 201a9038
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment