结构体 | |
struct | OsBcacheBlock |
struct | tagOsBcache |
类型定义 | |
typedef INT32(* | BcacheReadFun) (struct Vnode *, UINT8 *, UINT32, UINT64) |
typedef INT32(* | BcacheWriteFun) (struct Vnode *, const UINT8 *, UINT32, UINT64) |
typedef VOID(* | BcachePrereadFun) (struct tagOsBcache *, const OsBcacheBlock *) |
typedef struct tagOsBcache | OsBcache |
函数 | |
INT32 | BlockCacheRead (OsBcache *bc, UINT8 *buf, UINT32 *len, UINT64 pos, BOOL useRead) |
读块设备缓存 更多... | |
INT32 | BlockCacheWrite (OsBcache *bc, const UINT8 *buf, UINT32 *len, UINT64 pos) |
写块设备缓存 更多... | |
INT32 | BlockCacheSync (OsBcache *bc) |
块缓存同步 更多... | |
OsBcache * | BlockCacheInit (struct Vnode *devNode, UINT32 sectorSize, UINT32 sectorPerBlock, UINT32 blockNum, UINT64 blockCount) |
VOID | BlockCacheDeinit (OsBcache *bc) |
INT32 | BcacheClearCache (OsBcache *bc) |
INT32 | OsSdSync (INT32 id) |
VOID | BcacheSyncThreadInit (OsBcache *bc, INT32 id) |
块缓存同步任务初始化,开了个内核任务. 更多... | |
VOID | BcacheSyncThreadDeinit (const OsBcache *bc) |
UINT32 | BcacheAsyncPrereadInit (OsBcache *bc) |
VOID | ResumeAsyncPreread (OsBcache *arg1, const OsBcacheBlock *arg2) |
UINT32 | BcacheAsyncPrereadDeinit (OsBcache *bc) |
typedef VOID(* BcachePrereadFun) (struct tagOsBcache *, const OsBcacheBlock *) |
typedef struct tagOsBcache OsBcache |
VOID BcacheSyncThreadDeinit | ( | const OsBcache * | bc | ) |
块缓存同步任务初始化,开了个内核任务.
VOID BlockCacheDeinit | ( | OsBcache * | bc | ) |
bc | [IN] block cache instance |
#VOID | None. |
OsBcache * BlockCacheInit | ( | struct Vnode * | devNode, |
UINT32 | sectorSize, | ||
UINT32 | sectorPerBlock, | ||
UINT32 | blockNum, | ||
UINT64 | blockCount | ||
) |
devNode | [IN] dev node instance |
sectorSize | [IN] size of a sector |
sectorPerBlock | [IN] sector count per block in bcache |
blockNum | [IN] block number of bcache |
blockCount | [IN] block count of the disk |
OsBcache | * init succeded |
#NULL | init failed |
读块设备缓存
bc | [IN] block cache instance |
buf | [OUT] data buffer ptr |
len | [IN] number of bytes to read |
num | [IN] starting block number |
pos | [IN] starting position inside starting block |
useRead | [IN] whether use the read block or write block |
#0 | read succeded |
INT32 | read failed |
块缓存同步
bc | [IN] block cache instance |
#0 | sync succeded |
INT32 | sync failed |
写块设备缓存
bc | [IN] block cache instance |
buf | [IN] data buffer ptr |
len | [IN] number of bytes to write |
num | [IN] starting block number |
pos | [IN] starting position inside starting block |
#0 | write succeded |
INT32 | write failed |
VOID ResumeAsyncPreread | ( | OsBcache * | arg1, |
const OsBcacheBlock * | arg2 | ||
) |