32#include "linux/rbtree.h"
36#include "reset_shell.h"
38#include "inode/inode.h"
44#define ALIGN_LIB(x) (((x) + (HALARC_ALIGNMENT - 1)) & ~(HALARC_ALIGNMENT - 1))
45#define ALIGN_DISP(x) (HALARC_ALIGNMENT - ((x) & (HALARC_ALIGNMENT - 1)))
46#define UNSIGNED_INTEGER_BITS 32
47#define UNINT_MAX_SHIFT_BITS 31
48#define UNINT_LOG2_SHIFT 5
52#if CONFIG_FS_FAT_SECTOR_PER_BLOCK < UNSIGNED_INTEGER_BITS
55#define BCACHE_BLOCK_FLAGS (CONFIG_FS_FAT_SECTOR_PER_BLOCK / UNSIGNED_INTEGER_BITS)
60 struct rb_node rbNode;
103#ifdef LOSCFG_FS_FAT_CACHE_SYNC_THREAD
250#ifdef LOSCFG_FS_FAT_CACHE_SYNC_THREAD
INT32 BlockCacheWrite(OsBcache *bc, const UINT8 *buf, UINT32 *len, UINT64 num, UINT64 pos)
INT32(* BcacheReadFun)(struct inode *, UINT8 *, UINT32, UINT64)
Definition bcache.h:69
VOID BlockCacheDeinit(OsBcache *bc)
INT32(* BcacheWritevFun)(struct inode *, const struct iovec *, UINT32, UINT64)
Definition bcache.h:79
INT32 BlockCacheSync(OsBcache *bc)
OsBcache * BlockCacheInit(struct inode *devNode, UINT32 sectorSize, UINT32 sectorPerBlock, UINT32 blockNum, UINT64 blockCount)
INT32 BlockCacheRead(OsBcache *bc, UINT8 *buf, UINT32 *len, UINT64 num, UINT64 pos)
INT32(* BcacheWriteFun)(struct inode *, const UINT8 *, UINT32, UINT64)
Definition bcache.h:74
struct tagOsBcache OsBcache
signed int INT32
Definition los_typedef.h:55
unsigned long long UINT64
Definition los_typedef.h:72
#define VOID
Definition los_typedef.h:88
volatile INT32 Atomic
Definition los_typedef.h:85
unsigned char UINT8
Definition los_typedef.h:50
unsigned int UINT32
Definition los_typedef.h:52
size_t BOOL
Definition los_typedef.h:83
UINT64 age
Definition bcache.h:64
Atomic status
Definition bcache.h:62
BOOL readFlag
Definition bcache.h:63
LOS_DL_LIST listNode
Definition bcache.h:59
UINT8 * data
Definition bcache.h:65
UINT64 num
Definition bcache.h:61
Definition los_event.h:164
LOS_DL_LIST freeListHead
Definition bcache.h:95
LOS_DL_LIST listHead
Definition bcache.h:86
Atomic dirtyBlockNums
Definition bcache.h:102
UINT8 * memStart
Definition bcache.h:93
BcacheWriteFun bwriteFun
Definition bcache.h:97
UINT32 sectorPerBlock
Definition bcache.h:92
VOID * priv
Definition bcache.h:85
struct rb_root rbRoot
Definition bcache.h:87
UINT8 * rwBuffer
Definition bcache.h:99
BcacheWritevFun bwritevFun
Definition bcache.h:98
UINT64 blockCount
Definition bcache.h:90
UINT32 bcacheMutex
Definition bcache.h:100
UINT32 blockSizeLog2
Definition bcache.h:89
BcacheReadFun breadFun
Definition bcache.h:96
UINT64 curBlockNum
Definition bcache.h:94
UINT32 sectorSize
Definition bcache.h:91
UINT32 blockSize
Definition bcache.h:88
EVENT_CB_S bcacheEvent
Definition bcache.h:101