00001 00002 #ifndef _TRANS_H 00003 #define _TRANS_H 00004 00005 struct operation; 00006 00008 struct jtrans { 00010 struct jfs *fs; 00011 00013 int id; 00014 00016 uint32_t flags; 00017 00019 unsigned int numops_r; 00020 00022 unsigned int numops_w; 00023 00025 size_t len_w; 00026 00028 pthread_mutex_t lock; 00029 00031 struct operation *op; 00032 }; 00033 00035 enum op_direction { 00036 D_READ = 1, 00037 D_WRITE = 2, 00038 }; 00039 00041 struct operation { 00043 int locked; 00044 00046 off_t offset; 00047 00049 size_t len; 00050 00052 void *buf; 00053 00055 enum op_direction direction; 00056 00058 size_t plen; 00059 00061 void *pdata; 00062 00064 struct operation *prev; 00065 00067 struct operation *next; 00068 }; 00069 00070 /* lingered transaction */ 00071 struct journal_op; 00072 struct jlinger { 00073 struct journal_op *jop; 00074 struct jlinger *next; 00075 }; 00076 00077 00078 #endif 00079