Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 332507
b: refs/heads/master
c: e479d9b
h: refs/heads/master
i:
  332505: 30c9723
  332503: d059518
v: v3
  • Loading branch information
Alexander Block authored and Chris Mason committed Oct 1, 2012
1 parent be3ff35 commit 6c928c4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 34d73f54e2e2227cece751f168d08d3103092992
refs/heads/master: e479d9bb5f8366a064915b3c9ac47ed6e9fcc7d3
26 changes: 20 additions & 6 deletions trunk/fs/btrfs/send.c
Original file line number Diff line number Diff line change
Expand Up @@ -2886,12 +2886,6 @@ verbose_printk("btrfs: process_recorded_refs %llu\n", sctx->cur_ino);
}
}

/*
* Current inode is now at it's new position, so we must increase
* send_progress
*/
sctx->send_progress = sctx->cur_ino + 1;

ret = 0;

out:
Expand Down Expand Up @@ -3896,6 +3890,15 @@ static int process_recorded_refs_if_needed(struct send_ctx *sctx, int at_end)
goto out;

ret = process_recorded_refs(sctx);
if (ret < 0)
goto out;

/*
* We have processed the refs and thus need to advance send_progress.
* Now, calls to get_cur_xxx will take the updated refs of the current
* inode into account.
*/
sctx->send_progress = sctx->cur_ino + 1;

out:
return ret;
Expand Down Expand Up @@ -3993,6 +3996,12 @@ static int changed_inode(struct send_ctx *sctx,

sctx->cur_ino = key->objectid;
sctx->cur_inode_new_gen = 0;

/*
* Set send_progress to current inode. This will tell all get_cur_xxx
* functions that the current inode's refs are not updated yet. Later,
* when process_recorded_refs is finished, it is set to cur_ino + 1.
*/
sctx->send_progress = sctx->cur_ino;

if (result == BTRFS_COMPARE_TREE_NEW ||
Expand Down Expand Up @@ -4066,6 +4075,11 @@ static int changed_inode(struct send_ctx *sctx,
ret = process_all_refs(sctx, BTRFS_COMPARE_TREE_NEW);
if (ret < 0)
goto out;
/*
* Advance send_progress now as we did not get into
* process_recorded_refs_if_needed in the new_gen case.
*/
sctx->send_progress = sctx->cur_ino + 1;
ret = process_all_extents(sctx);
if (ret < 0)
goto out;
Expand Down

0 comments on commit 6c928c4

Please sign in to comment.