00001 00002 #ifndef _JOURNAL_H 00003 #define _JOURNAL_H 00004 00005 #include <stdint.h> 00006 #include "libjio.h" 00007 00008 00009 struct journal_op { 00010 int id; 00011 int fd; 00012 int numops; 00013 char *name; 00014 uint32_t csum; 00015 struct jfs *fs; 00016 }; 00017 00018 typedef struct journal_op jop_t; 00019 00020 struct journal_op *journal_new(struct jfs *fs, unsigned int flags); 00021 int journal_add_op(struct journal_op *jop, unsigned char *buf, size_t len, 00022 off_t offset); 00023 void journal_pre_commit(struct journal_op *jop); 00024 int journal_commit(struct journal_op *jop); 00025 int journal_free(struct journal_op *jop, int do_unlink); 00026 00027 int fill_trans(unsigned char *map, off_t len, struct jtrans *ts); 00028 00029 #endif 00030