sysfs: Remove support for tagged directories with untagged members (again)
[linux-btrfs-devel.git] / include / linux / journal-head.h
blob423cb6d78ee0bc9958d63a592f53c7d5a17fa874
1 /*
2 * include/linux/journal-head.h
4 * buffer_head fields for JBD
6 * 27 May 2001 Andrew Morton
7 * Created - pulled out of fs.h
8 */
10 #ifndef JOURNAL_HEAD_H_INCLUDED
11 #define JOURNAL_HEAD_H_INCLUDED
13 typedef unsigned int tid_t; /* Unique transaction ID */
14 typedef struct transaction_s transaction_t; /* Compound transaction type */
17 struct buffer_head;
19 struct journal_head {
21 * Points back to our buffer_head. [jbd_lock_bh_journal_head()]
23 struct buffer_head *b_bh;
26 * Reference count - see description in journal.c
27 * [jbd_lock_bh_journal_head()]
29 int b_jcount;
32 * Journalling list for this buffer [jbd_lock_bh_state()]
34 unsigned b_jlist;
37 * This flag signals the buffer has been modified by
38 * the currently running transaction
39 * [jbd_lock_bh_state()]
41 unsigned b_modified;
44 * This feild tracks the last transaction id in which this buffer
45 * has been cowed
46 * [jbd_lock_bh_state()]
48 tid_t b_cow_tid;
51 * Copy of the buffer data frozen for writing to the log.
52 * [jbd_lock_bh_state()]
54 char *b_frozen_data;
57 * Pointer to a saved copy of the buffer containing no uncommitted
58 * deallocation references, so that allocations can avoid overwriting
59 * uncommitted deletes. [jbd_lock_bh_state()]
61 char *b_committed_data;
64 * Pointer to the compound transaction which owns this buffer's
65 * metadata: either the running transaction or the committing
66 * transaction (if there is one). Only applies to buffers on a
67 * transaction's data or metadata journaling list.
68 * [j_list_lock] [jbd_lock_bh_state()]
70 transaction_t *b_transaction;
73 * Pointer to the running compound transaction which is currently
74 * modifying the buffer's metadata, if there was already a transaction
75 * committing it when the new transaction touched it.
76 * [t_list_lock] [jbd_lock_bh_state()]
78 transaction_t *b_next_transaction;
81 * Doubly-linked list of buffers on a transaction's data, metadata or
82 * forget queue. [t_list_lock] [jbd_lock_bh_state()]
84 struct journal_head *b_tnext, *b_tprev;
87 * Pointer to the compound transaction against which this buffer
88 * is checkpointed. Only dirty buffers can be checkpointed.
89 * [j_list_lock]
91 transaction_t *b_cp_transaction;
94 * Doubly-linked list of buffers still remaining to be flushed
95 * before an old transaction can be checkpointed.
96 * [j_list_lock]
98 struct journal_head *b_cpnext, *b_cpprev;
100 /* Trigger type */
101 struct jbd2_buffer_trigger_type *b_triggers;
103 /* Trigger type for the committing transaction's frozen data */
104 struct jbd2_buffer_trigger_type *b_frozen_triggers;
107 #endif /* JOURNAL_HEAD_H_INCLUDED */