Changeset 755

Show
Ignore:
Timestamp:
07/08/08 18:16:14 (3 months ago)
Author:
mwhitworth
Message:

Add to journal data structures.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Whitix/branches/fs/include/fs/journal.h

    r750 r755  
    2727#include <preempt.h> 
    2828#include <task.h> 
     29#include <timer.h> 
    2930#include <typedefs.h> 
    3031 
    3132/* In-memory structures. */ 
     33 
     34#define JTRANS_RUNNING  1 
     35 
     36struct JournalHead 
     37{ 
     38        struct Buffer* buffer; 
     39}; 
     40 
     41struct JournalTrans 
     42{ 
     43        struct Journal* journal; 
     44        int state, transId, outstandingBlocks; 
     45        struct Timer* expireTimer; 
     46        int updates, handleCount; 
     47}; 
    3248 
    3349/* JournalHandle denotes one atomic update to the filesystem. */ 
     
    3551{ 
    3652        int refs, numBlocks; 
    37 }; 
    38  
    39 struct JournalTrans 
    40 { 
     53        struct JournalTrans* transaction; 
    4154}; 
    4255 
     
    4659        int version; 
    4760        DWORD maxLength, sectorSize, maxTransactionBuffers; 
     61        DWORD transSequence; 
    4862        struct JournalTrans* currTransaction; 
    4963}; 
     
    7488 
    7589/* Prototypes */ 
     90 
     91/* journal.c */ 
    7692struct Journal* JournalCreate(struct VNode* vNode); 
     93struct JournalHandle* JournalStart(struct Journal* journal, int numBlocks); 
     94struct JournalHead* JournalAddHeader(struct Buffer* buffer); 
     95 
     96/* transaction.c */ 
     97int JournalGetWriteAccess(struct JournalHandle* handle, struct Buffer* buffer); 
    7798 
    7899/* Defines */