Show
Ignore:
Timestamp:
08/21/08 21:46:06 (4 years ago)
Author:
mwhitworth
Message:

Add info.h, icfs.h and kfs.h for infofs/configfs layer.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Whitix/trunk/include/fs/bcache.h

    r670 r853  
    2525#define VFS_BCACHE_H 
    2626 
     27#include <sdevice.h> 
     28#include <wait.h> 
     29 
    2730/* Buffer flags. Bit index into buffer->flags. */ 
    2831#define BUFFER_DIRTY    0x0 
    2932#define BUFFER_LOCKED   0x1 
     33#define BUFFER_JOURNAL  0x2 
    3034 
    3135/* Defines for dealing with flags. */ 
    3236#define BufferLocked(buffer) ((buffer)->flags & (1 << BUFFER_LOCKED)) 
    3337#define BufferDirty(buffer) ((buffer)->flags & (1 << BUFFER_DIRTY)) 
     38#define BufferJournal(buffer) ((buffer)->flags & (1 << BUFFER_JOURNAL)) 
    3439 
    3540/* Reference counting. Blocks are only freed if there are no references 
     
    5358        BYTE* data; 
    5459        WaitQueue waitQueue; 
     60        void* privData; 
    5561}; 
    5662 
     
    5864 
    5965int BlockInit(); 
     66struct Buffer* BlockBufferAlloc(struct StorageDevice* device, DWORD blockNum); 
    6067struct Buffer* BlockRead(struct StorageDevice* device,DWORD blockNum); 
    6168int BlockWrite(struct StorageDevice* device,struct Buffer* buffer); 
     
    6471int BlockFree(struct Buffer* buffer); 
    6572int BlockSetSize(struct StorageDevice* device,int blockSize); 
     73int BlockCreateHashTable(struct StorageDevice* dev); 
    6674 
    6775/* Buffer locking */