summaryrefslogtreecommitdiff
path: root/src/journal.h
diff options
context:
space:
mode:
authorrobi <robi>2010-08-29 16:34:58 +0000
committerrobi <robi>2010-08-29 16:34:58 +0000
commit6512ac6340cc34ed778505293943b664e4ec1b4c (patch)
tree6f2510b7be701282e585f6348e8c3ae966917261 /src/journal.h
parente66d5f9b85fd816571fe4a780f05fc0ad0b8256f (diff)
magic functions part2 (inactiv)
Diffstat (limited to 'src/journal.h')
-rw-r--r--src/journal.h34
1 files changed, 31 insertions, 3 deletions
diff --git a/src/journal.h b/src/journal.h
index c4bf5d3..9a05fbc 100644
--- a/src/journal.h
+++ b/src/journal.h
@@ -24,25 +24,53 @@
//struct for cache the descriptor data
typedef struct journal_descriptor_tag_s
{
- blk64_t f_blocknr; /* Tho od-disk block number */
+ blk64_t f_blocknr; /* The on-disk block number */
__u32 j_blocknr; /* The on-journal block number */
__u32 transaction; /* Transaction Sequence*/
} journal_descriptor_tag_t;
+//struct for cache the block bitmap data
+typedef struct journal_bitmap_tag_s
+{
+ blk64_t blockgroup; /* The blockgroup of bitmap */
+ __u32 j_blocknr; /* The on-journal block number */
+ __u32 transaction; /* Transaction Sequence*/
+} journal_bitmap_tag_t;
+
+
+struct j_bitmap_list_t
+{
+ int count;
+ journal_bitmap_tag_t *list;
+ __u32 groups;
+ __u32 first_trans;
+ __u32 last_trans;
+ journal_bitmap_tag_t *pointer;
+ unsigned int blocksize ;
+ unsigned int blocklen ;
+ unsigned int last_blocklen ;
+ char* block_buf;
+
+};
void dump_journal_superblock( void); //print journal superblock
extern int journal_open(char* , int );// open an extract the blocklist from journal
extern int journal_close(void); // close the journal (last function in main() if the journal open)
static int init_journal(void); // main for extract the journal to the local private data
static const char *type_to_name(int);
-int get_block_list_count(blk64_t block);//get count of journal blocklist
+int get_block_list_count(blk64_t);//get count of journal blocklist
__u32 get_trans_time( __u32); //get the transactiontime of a transactionnumber
-int get_block_list(journal_descriptor_tag_t *, blk64_t, int);//get a sortet list of all copys of a filesystemblock
+int get_block_list(journal_descriptor_tag_t*, blk64_t, int);//get a sortet list of all copys of a filesystemblock
int read_journal_block(off_t, char*, int, unsigned int*);
void print_block_list(int);
int dump_journal_block( __u32 , int );
void print_block_transaction(blk64_t,int);//print all transactions for a fs-block
__u32 get_journal_blocknr(blk64_t, __u32);// get the last dir-block for transaction from journal or if not found the real block
+int get_last_block(char*, blk_t*, __u32, __u32);// get the last dir-block for transaction from journal or if not, found the real block
+int get_block_bitmap_list( journal_bitmap_tag_t**);//get a list of all copies of blockbitmap from journal
+int init_block_bitmap_list(ext2fs_block_bitmap* , __u32); //create and init the the journal block bitmap
+void clear_block_bitmap_list(ext2fs_block_bitmap); //destroy the journal block bitmap
+int next_block_bitmap(ext2fs_block_bitmap); //produces a differential block bitmap for a transaction from the Journal
#endif \ No newline at end of file