Rev 422 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
422 | giacomo | 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 | |||
13 | typedef unsigned int tid_t; /* Unique transaction ID */ |
||
14 | typedef struct transaction_s transaction_t; /* Compound transaction type */ |
||
15 | struct buffer_head; |
||
16 | |||
17 | struct 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 | * Copy of the buffer data frozen for writing to the log. |
||
36 | * [jbd_lock_bh_state()] |
||
37 | */ |
||
38 | char *b_frozen_data; |
||
39 | |||
40 | /* |
||
41 | * Pointer to a saved copy of the buffer containing no uncommitted |
||
42 | * deallocation references, so that allocations can avoid overwriting |
||
43 | * uncommitted deletes. [jbd_lock_bh_state()] |
||
44 | */ |
||
45 | char *b_committed_data; |
||
46 | |||
47 | /* |
||
48 | * Pointer to the compound transaction which owns this buffer's |
||
49 | * metadata: either the running transaction or the committing |
||
50 | * transaction (if there is one). Only applies to buffers on a |
||
51 | * transaction's data or metadata journaling list. |
||
52 | * [j_list_lock] [jbd_lock_bh_state()] |
||
53 | */ |
||
54 | transaction_t *b_transaction; |
||
55 | |||
56 | /* |
||
57 | * Pointer to the running compound transaction which is currently |
||
58 | * modifying the buffer's metadata, if there was already a transaction |
||
59 | * committing it when the new transaction touched it. |
||
60 | * [t_list_lock] [jbd_lock_bh_state()] |
||
61 | */ |
||
62 | transaction_t *b_next_transaction; |
||
63 | |||
64 | /* |
||
65 | * Doubly-linked list of buffers on a transaction's data, metadata or |
||
66 | * forget queue. [t_list_lock] [jbd_lock_bh_state()] |
||
67 | */ |
||
68 | struct journal_head *b_tnext, *b_tprev; |
||
69 | |||
70 | /* |
||
71 | * Pointer to the compound transaction against which this buffer |
||
72 | * is checkpointed. Only dirty buffers can be checkpointed. |
||
73 | * [j_list_lock] |
||
74 | */ |
||
75 | transaction_t *b_cp_transaction; |
||
76 | |||
77 | /* |
||
78 | * Doubly-linked list of buffers still remaining to be flushed |
||
79 | * before an old transaction can be checkpointed. |
||
80 | * [j_list_lock] |
||
81 | */ |
||
82 | struct journal_head *b_cpnext, *b_cpprev; |
||
83 | }; |
||
84 | |||
85 | #endif /* JOURNAL_HEAD_H_INCLUDED */ |