Changeset 853 for Whitix/trunk/include/fs/bcache.h
- Timestamp:
- 08/21/08 21:46:06 (4 years ago)
- Files:
-
- 1 modified
-
Whitix/trunk/include/fs/bcache.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Whitix/trunk/include/fs/bcache.h
r670 r853 25 25 #define VFS_BCACHE_H 26 26 27 #include <sdevice.h> 28 #include <wait.h> 29 27 30 /* Buffer flags. Bit index into buffer->flags. */ 28 31 #define BUFFER_DIRTY 0x0 29 32 #define BUFFER_LOCKED 0x1 33 #define BUFFER_JOURNAL 0x2 30 34 31 35 /* Defines for dealing with flags. */ 32 36 #define BufferLocked(buffer) ((buffer)->flags & (1 << BUFFER_LOCKED)) 33 37 #define BufferDirty(buffer) ((buffer)->flags & (1 << BUFFER_DIRTY)) 38 #define BufferJournal(buffer) ((buffer)->flags & (1 << BUFFER_JOURNAL)) 34 39 35 40 /* Reference counting. Blocks are only freed if there are no references … … 53 58 BYTE* data; 54 59 WaitQueue waitQueue; 60 void* privData; 55 61 }; 56 62 … … 58 64 59 65 int BlockInit(); 66 struct Buffer* BlockBufferAlloc(struct StorageDevice* device, DWORD blockNum); 60 67 struct Buffer* BlockRead(struct StorageDevice* device,DWORD blockNum); 61 68 int BlockWrite(struct StorageDevice* device,struct Buffer* buffer); … … 64 71 int BlockFree(struct Buffer* buffer); 65 72 int BlockSetSize(struct StorageDevice* device,int blockSize); 73 int BlockCreateHashTable(struct StorageDevice* dev); 66 74 67 75 /* Buffer locking */
