Message ID | 1388231559-2463-1-git-send-email-wangshilong1991@gmail.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index b530ed9..4a3f0d9 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -4075,6 +4075,12 @@ restart: if (!RB_EMPTY_ROOT(&blocks)) { ret = relocate_tree_blocks(trans, rc, &blocks); if (ret < 0) { + /* + * if we fail to relocate tree blocks, force to update + * backref cache when committing transaction. + */ + rc->backref_cache.last_trans = trans->transid - 1; + if (ret != -EAGAIN) { err = ret; break;