diff options
author | Josef Bacik <jbacik@fb.com> | 2015-09-24 10:46:10 -0400 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-10-21 18:51:45 -0700 |
commit | 3204d33cda40d9bc97f257c441225d3713916661 (patch) | |
tree | e49b77582067a853de06552056a1ae82785024a4 /fs/btrfs/extent-tree.c | |
parent | 0b670dc44c91bd1e5fac15b5ac4c98c8bd255ca2 (diff) | |
download | linux-3204d33cda40d9bc97f257c441225d3713916661.tar.gz linux-3204d33cda40d9bc97f257c441225d3713916661.tar.bz2 linux-3204d33cda40d9bc97f257c441225d3713916661.zip |
Btrfs: add a flags field to btrfs_transaction
I want to set some per transaction flags, so instead of adding yet another int
lets just convert the current two int indicators to flags and add a flags field
for future use. Thanks,
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 0e32abf53b5b..e0dfe3578b00 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -4066,7 +4066,8 @@ commit_trans: if (IS_ERR(trans)) return PTR_ERR(trans); if (have_pinned_space >= 0 || - trans->transaction->have_free_bgs || + test_bit(BTRFS_TRANS_HAVE_FREE_BGS, + &trans->transaction->flags) || need_commit > 0) { ret = btrfs_commit_transaction(trans, root); if (ret) @@ -8938,7 +8939,7 @@ again: * back off and let this transaction commit */ mutex_lock(&root->fs_info->ro_block_group_mutex); - if (trans->transaction->dirty_bg_run) { + if (test_bit(BTRFS_TRANS_DIRTY_BG_RUN, &trans->transaction->flags)) { u64 transid = trans->transid; mutex_unlock(&root->fs_info->ro_block_group_mutex); |