00001
00013 #ifndef MAPPER_H
00014 #define MAPPER_H
00015
00016 #include <vstypes.h>
00017
00018
00028 #define FS_MAPPER_VERSION 0x010C
00029
00030
00031 #ifndef ASM
00032 struct FsPhysical;
00033
00038 struct FsMapper {
00041 u_int16 version;
00043 u_int16 blockSize;
00045 u_int32 blocks;
00047 u_int16 cacheBlocks;
00049 struct FsMapper *(*Create)(struct FsPhysical *physical, u_int16 cacheSize);
00051 s_int16 (*Delete)(struct FsMapper *map);
00053 s_int16 (*Read)(struct FsMapper *map, u_int32 firstBlock, u_int16 blocks,
00054 u_int16 *data);
00056 s_int16 (*Write)(struct FsMapper *map, u_int32 firstBlock, u_int16 blocks,
00057 u_int16 *data);
00060 s_int16 (*Free)(struct FsMapper *map, u_int32 firstBlock, u_int32 blocks);
00063 s_int16 (*Flush)(struct FsMapper *map, u_int16 hard);
00065 struct FsPhysical *physical;
00066 };
00067 #endif
00068
00069 #define MAP_VERSION_OFFSET 0
00070 #define MAP_BLOCK_SIZE_OFFSET 1
00071 #define MAP_BLOCKS_OFFSET 2
00072 #define MAP_CACHE_BLOCKS_OFFSET 4
00073 #define MAP_CREATE_OFFSET 5
00074 #define MAP_DELETE_OFFSET 6
00075 #define MAP_READ_OFFSET 7
00076 #define MAP_WRITE_OFFSET 8
00077 #define MAP_FREE_OFFSET 9
00078 #define MAP_FLUSH_OFFSET 10
00079 #define MAP_PHYSICAL_OFFSET 11
00080
00081 #endif