1 #ifndef _TRANSACTIONS_H
2 #define _TRANSACTIONS_H
4 #include <exec/types.h>
5 #include <libraries/iffparse.h>
6 #include "blockstructure.h"
7 #include "redblacktree.h"
9 /* Operation : A single block modification
10 Transaction : A series of block modifications which together result in a valid disk */
12 struct OperationInformation
{
13 UWORD length
; /* Length in bytes of the compressed data. */
15 UBYTE bits
; /* See defines below. */
19 /* Defines for bits: */
21 #define OI_EMPTY (1) /* When set indicates that this block has no original. */
22 #define OI_DELETE (2) /* When set indicates that this block does not need to be written
23 anymore (ie, when blocks become unused and marked free). */
27 struct Operation
*left
;
28 struct Operation
*right
;
29 struct Operation
*parent
;
30 #ifdef CHECKCODE_TRANSACTIONS
36 // struct Operation *next;
37 // struct Operation *previous;
39 struct OperationInformation oi
;
43 #define TRANSACTIONSTORAGE_ID AROS_LONG2BE(MAKE_ID('T','R','S','T'))
44 #define TRANSACTIONFAILURE_ID AROS_LONG2BE(MAKE_ID('T','R','F','A'))
45 #define TRANSACTIONOK_ID AROS_LONG2BE(MAKE_ID('T','R','O','K'))
47 /* The blocks used for storing the Transaction buffer are linked in a
48 singly linked list. The data they hold is a direct copy of all
51 struct fsTransactionStorage
{
52 struct fsBlockHeader bheader
;
60 struct fsTransactionFailure
{
61 struct fsBlockHeader bheader
;
63 BLCK be_firsttransaction
;
66 #endif // _TRANSACTIONS_H