summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.h
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fb.com>2015-09-24 10:46:10 -0400
committerChris Mason <clm@fb.com>2015-10-21 21:51:45 -0400
commit3204d33cda40d9bc97f257c441225d3713916661 (patch)
treee49b77582067a853de06552056a1ae82785024a4 /fs/btrfs/transaction.h
parent0b670dc44c91bd1e5fac15b5ac4c98c8bd255ca2 (diff)
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/transaction.h')
-rw-r--r--fs/btrfs/transaction.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/btrfs/transaction.h b/fs/btrfs/transaction.h
index bf7b1ddf5993..109b8b7fb48e 100644
--- a/fs/btrfs/transaction.h
+++ b/fs/btrfs/transaction.h
@@ -32,6 +32,9 @@ enum btrfs_trans_state {
32 TRANS_STATE_MAX = 6, 32 TRANS_STATE_MAX = 6,
33}; 33};
34 34
35#define BTRFS_TRANS_HAVE_FREE_BGS 0
36#define BTRFS_TRANS_DIRTY_BG_RUN 1
37
35struct btrfs_transaction { 38struct btrfs_transaction {
36 u64 transid; 39 u64 transid;
37 /* 40 /*
@@ -48,10 +51,7 @@ struct btrfs_transaction {
48 atomic_t use_count; 51 atomic_t use_count;
49 atomic_t pending_ordered; 52 atomic_t pending_ordered;
50 53
51 /* 54 unsigned long flags;
52 * true if there is free bgs operations in this transaction
53 */
54 int have_free_bgs;
55 55
56 /* Be protected by fs_info->trans_lock when we want to change it. */ 56 /* Be protected by fs_info->trans_lock when we want to change it. */
57 enum btrfs_trans_state state; 57 enum btrfs_trans_state state;
@@ -81,7 +81,6 @@ struct btrfs_transaction {
81 spinlock_t dropped_roots_lock; 81 spinlock_t dropped_roots_lock;
82 struct btrfs_delayed_ref_root delayed_refs; 82 struct btrfs_delayed_ref_root delayed_refs;
83 int aborted; 83 int aborted;
84 int dirty_bg_run;
85}; 84};
86 85
87#define __TRANS_FREEZABLE (1U << 0) 86#define __TRANS_FREEZABLE (1U << 0)