diff options
Diffstat (limited to 'fs/btrfs/tree-log.c')
| -rw-r--r-- | fs/btrfs/tree-log.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 3568374d419d..966cc74f5d6c 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c | |||
| @@ -589,7 +589,7 @@ static noinline int replay_one_extent(struct btrfs_trans_handle *trans, | |||
| 589 | ret = btrfs_inc_extent_ref(trans, root, | 589 | ret = btrfs_inc_extent_ref(trans, root, |
| 590 | ins.objectid, ins.offset, | 590 | ins.objectid, ins.offset, |
| 591 | 0, root->root_key.objectid, | 591 | 0, root->root_key.objectid, |
| 592 | key->objectid, offset); | 592 | key->objectid, offset, 0); |
| 593 | BUG_ON(ret); | 593 | BUG_ON(ret); |
| 594 | } else { | 594 | } else { |
| 595 | /* | 595 | /* |
| @@ -1957,7 +1957,8 @@ static int wait_log_commit(struct btrfs_trans_handle *trans, | |||
| 1957 | 1957 | ||
| 1958 | finish_wait(&root->log_commit_wait[index], &wait); | 1958 | finish_wait(&root->log_commit_wait[index], &wait); |
| 1959 | mutex_lock(&root->log_mutex); | 1959 | mutex_lock(&root->log_mutex); |
| 1960 | } while (root->log_transid < transid + 2 && | 1960 | } while (root->fs_info->last_trans_log_full_commit != |
| 1961 | trans->transid && root->log_transid < transid + 2 && | ||
| 1961 | atomic_read(&root->log_commit[index])); | 1962 | atomic_read(&root->log_commit[index])); |
| 1962 | return 0; | 1963 | return 0; |
| 1963 | } | 1964 | } |
| @@ -1966,7 +1967,8 @@ static int wait_for_writer(struct btrfs_trans_handle *trans, | |||
| 1966 | struct btrfs_root *root) | 1967 | struct btrfs_root *root) |
| 1967 | { | 1968 | { |
| 1968 | DEFINE_WAIT(wait); | 1969 | DEFINE_WAIT(wait); |
| 1969 | while (atomic_read(&root->log_writers)) { | 1970 | while (root->fs_info->last_trans_log_full_commit != |
| 1971 | trans->transid && atomic_read(&root->log_writers)) { | ||
| 1970 | prepare_to_wait(&root->log_writer_wait, | 1972 | prepare_to_wait(&root->log_writer_wait, |
| 1971 | &wait, TASK_UNINTERRUPTIBLE); | 1973 | &wait, TASK_UNINTERRUPTIBLE); |
| 1972 | mutex_unlock(&root->log_mutex); | 1974 | mutex_unlock(&root->log_mutex); |
