aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/journal-head.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/journal-head.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/linux/journal-head.h')
-rw-r--r--include/linux/journal-head.h92
1 files changed, 92 insertions, 0 deletions
diff --git a/include/linux/journal-head.h b/include/linux/journal-head.h
new file mode 100644
index 000000000000..8a62d1e84b9b
--- /dev/null
+++ b/include/linux/journal-head.h
@@ -0,0 +1,92 @@
1/*
2 * include/linux/journal-head.h
3 *
4 * buffer_head fields for JBD
5 *
6 * 27 May 2001 Andrew Morton <akpm@digeo.com>
7 * Created - pulled out of fs.h
8 */
9
10#ifndef JOURNAL_HEAD_H_INCLUDED
11#define JOURNAL_HEAD_H_INCLUDED
12
13typedef unsigned int tid_t; /* Unique transaction ID */
14typedef struct transaction_s transaction_t; /* Compound transaction type */
15struct buffer_head;
16
17struct journal_head {
18 /*
19 * Points back to our buffer_head. [jbd_lock_bh_journal_head()]
20 */
21 struct buffer_head *b_bh;
22
23 /*
24 * Reference count - see description in journal.c
25 * [jbd_lock_bh_journal_head()]
26 */
27 int b_jcount;
28
29 /*
30 * Journalling list for this buffer [jbd_lock_bh_state()]
31 */
32 unsigned b_jlist;
33
34 /*
35 * This flag signals the buffer has been modified by
36 * the currently running transaction
37 * [jbd_lock_bh_state()]
38 */
39 unsigned b_modified;
40
41 /*
42 * Copy of the buffer data frozen for writing to the log.
43 * [jbd_lock_bh_state()]
44 */
45 char *b_frozen_data;
46
47 /*
48 * Pointer to a saved copy of the buffer containing no uncommitted
49 * deallocation references, so that allocations can avoid overwriting
50 * uncommitted deletes. [jbd_lock_bh_state()]
51 */
52 char *b_committed_data;
53
54 /*
55 * Pointer to the compound transaction which owns this buffer's
56 * metadata: either the running transaction or the committing
57 * transaction (if there is one). Only applies to buffers on a
58 * transaction's data or metadata journaling list.
59 * [j_list_lock] [jbd_lock_bh_state()]
60 */
61 transaction_t *b_transaction;
62
63 /*
64 * Pointer to the running compound transaction which is currently
65 * modifying the buffer's metadata, if there was already a transaction
66 * committing it when the new transaction touched it.
67 * [t_list_lock] [jbd_lock_bh_state()]
68 */
69 transaction_t *b_next_transaction;
70
71 /*
72 * Doubly-linked list of buffers on a transaction's data, metadata or
73 * forget queue. [t_list_lock] [jbd_lock_bh_state()]
74 */
75 struct journal_head *b_tnext, *b_tprev;
76
77 /*
78 * Pointer to the compound transaction against which this buffer
79 * is checkpointed. Only dirty buffers can be checkpointed.
80 * [j_list_lock]
81 */
82 transaction_t *b_cp_transaction;
83
84 /*
85 * Doubly-linked list of buffers still remaining to be flushed
86 * before an old transaction can be checkpointed.
87 * [j_list_lock]
88 */
89 struct journal_head *b_cpnext, *b_cpprev;
90};
91
92#endif /* JOURNAL_HEAD_H_INCLUDED */