56 int dieNo, invalidSliceCnt;
60 for (dieNo = 0; dieNo <
USER_DIES; dieNo++)
62 for (invalidSliceCnt = 0; invalidSliceCnt <
SLICES_PER_BLOCK + 1; invalidSliceCnt++)
72 unsigned int victimBlockNo, pageNo, virtualSliceAddr, logicalSliceAddr, dieNoForGcCopy, reqSlotTag;
75 dieNoForGcCopy = dieNo;
162 unsigned int evictedBlockNo;
165 for (invalidSliceCnt =
SLICES_PER_BLOCK; invalidSliceCnt > 0; invalidSliceCnt--)
183 return evictedBlockNo;
187 assert(!
"[WARNING] There are no free blocks. Abort terminate this ssd. [WARNING]");
193 unsigned int nextBlock, prevBlock, invalidSliceCnt;
P_LOGICAL_SLICE_MAP logicalSliceMapPtr
void EraseBlock(unsigned int dieNo, unsigned int blockNo)
Erase the specified block of the specified die and discard its LSAs.
unsigned int FindFreeVirtualSliceForGc(unsigned int copyTargetDieNo, unsigned int victimBlockNo)
P_VIRTUAL_SLICE_MAP virtualSliceMapPtr
P_VIRTUAL_BLOCK_MAP virtualBlockMapPtr
#define Vorg2VsaTranslation(dieNo, blockNo, pageNo)
Translate virtual NAND organization (location vector) into VSA.
void UpdateTempDataBufEntryInfoBlockingReq(unsigned int bufEntry, unsigned int reqSlotTag)
Append the request to the blocking queue specified by given temp buffer entry.
unsigned int AllocateTempDataBuf(unsigned int dieNo)
Retrieve the index of temp buffer entry of the target die.
#define USER_PAGES_PER_BLOCK
unsigned int GetFromGcVictimList(unsigned int dieNo)
void PutToGcVictimList(unsigned int dieNo, unsigned int blockNo, unsigned int invalidSliceCnt)
void GarbageCollection(unsigned int dieNo)
void SelectiveGetFromGcVictimList(unsigned int dieNo, unsigned int blockNo)
P_GC_VICTIM_MAP gcVictimMapPtr
struct _GC_VICTIM_MAP * P_GC_VICTIM_MAP
#define GC_VICTIM_MAP_ADDR
unsigned int GetFromFreeReqQ()
Get a free request from the free request queue.
GC_VICTIM_LIST_ENTRY gcVictimList[USER_DIES][SLICES_PER_BLOCK+1]
unsigned int virtualSliceAddr
LOGICAL_SLICE_ENTRY logicalSlice[SLICES_PER_SSD]
unsigned int virtualSliceAddr
unsigned int nandEccWarning
unsigned int dataBufFormat
Type of address stored in the SSD_REQ_FORMAT::dataBufInfo.
unsigned int nandAddr
Type of address stored in the SSD_REQ_FORMAT::nandInfo.
unsigned int rowAddrDependencyCheck
SSD_REQ_FORMAT reqPool[AVAILABLE_OUNTSTANDING_REQ_COUNT]
unsigned int invalidSliceCnt
VIRTUAL_BLOCK_ENTRY block[USER_DIES][USER_BLOCKS_PER_DIE]
unsigned int logicalSliceAddr
VIRTUAL_SLICE_ENTRY virtualSlice[SLICES_PER_SSD]