Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309921
b: refs/heads/master
c: 20b297d
h: refs/heads/master
i:
  309919: 56a42e7
v: v3
  • Loading branch information
Jan Schmidt committed May 30, 2012
1 parent c469cc3 commit 74a0508
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 19ae4e8133f370d820c4cdd61a4b703235664a5f
refs/heads/master: 20b297d620cd1bb94127942bbb3702fb7b1030b2
18 changes: 18 additions & 0 deletions trunk/fs/btrfs/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,24 @@ static noinline int join_transaction(struct btrfs_root *root, int nofail)
cur_trans->delayed_refs.flushing = 0;
cur_trans->delayed_refs.run_delayed_start = 0;
cur_trans->delayed_refs.seq = 1;

/*
* although the tree mod log is per file system and not per transaction,
* the log must never go across transaction boundaries.
*/
smp_mb();
if (!list_empty(&fs_info->tree_mod_seq_list)) {
printk(KERN_ERR "btrfs: tree_mod_seq_list not empty when "
"creating a fresh transaction\n");
WARN_ON(1);
}
if (!RB_EMPTY_ROOT(&fs_info->tree_mod_log)) {
printk(KERN_ERR "btrfs: tree_mod_log rb tree not empty when "
"creating a fresh transaction\n");
WARN_ON(1);
}
atomic_set(&fs_info->tree_mod_seq, 0);

init_waitqueue_head(&cur_trans->delayed_refs.seq_wait);
spin_lock_init(&cur_trans->commit_lock);
spin_lock_init(&cur_trans->delayed_refs.lock);
Expand Down

0 comments on commit 74a0508

Please sign in to comment.