| Revision 1 (by moose, 2006/07/06 01:31:16) |
Initial import
|
#ifndef TFS_PAGER_H_GUARD
#define TFS_PAGER_H_GUARD
#include "debug.h"
typedef uint32_t tfs_pgno_t;
// Journal File Format
struct tfs_journal_fmt_s {
uint64_t magic;
uint32_t valid_pages;
uint32_t sanity_check;
off_t trunc_size;
} __attribute__((packed));
struct tfs_page_rec_s {
tfs_pgno_t pgno;
char data[TFS_PAGE_SIZE];
};
/*
Steps
Data Written:
1. Grab data from original page (read it in if nesesary)
2. Write original data to journal
3. sync journal
4. Write new "valid_pages"
5. sync journal
3. mark page as dirty
*/
#endif /* TFS_PAGER_H_GUARD */