📄 dtdecode.h
字号:
* Remarks: None.
****************************************************************************/
u32 decod_locateBufferNextLogDrvInDiskArray(const u8 * pu8DiskArray,
const u32 u32Length, const u32 u32_IndexStart, u8 ** ppLogDrv);
u32 decod_locateBufferLogDrvInDaPrecise(const u8 * pu8DiskArray,
const u32 u32Length, const u32 u32DevId, u8 ** ppLogDrv);
/***************************************************************************
* Function Name: decod_locateBufferAxleInLogDrv
* Description: locate the specified axle in the logical drive definition buffer
* Parameters:
* [in] pu8LogDrv, the data buffer that contains the disk array info
* [in] u16AxleNum, the axle number to identify the axle
* [out] ppAxle, the pointer to the axle definition to be returned
* Return: PIERR_NO_ERROR, succeeded; otherwise, failed.
* Remarks: None.
****************************************************************************/
u32 decod_locateBufferAxleInLogDrv(const u8 * pu8LogDrv,
const u16 u16AxleNum, u8 ** ppAxle);
/***************************************************************************
* Function Name: decod_getStringDiskArrayOpStatus
* Description: get the op status string of a disk array.
* Parameters:
* [out] pstrOpStatus, the op status string to be returned
* [in] pu8DiskArray, disk array data buffer
* [in] u32ArrayLength, the size of the disk array data buffer
* Return: none.
* Remarks: none.
****************************************************************************/
void decod_getStringDiskArrayOpStatus(char * pstrOpStatus,
const u8 * pu8DiskArray, const u32 u32ArrayLength);
void decod_getStringDiskArrayOpStatusEx(char * pstrOpStatus,
const u8 * pu8DiskArray, const u32 u32ArrayLength);
/*
this may not be necessary for disk array.
void decod_getStringDiskArrayOpStatusEx(char * pstrOpStatus, const u32 u32Flags);
*/
/***************************************************************************
* Function Name: decod_getDiskArrayOpStatus
* Description: get the op status array of a disk array. The most significant
* op status goes at u16OpStatus[0].
* Parameters:
* [in] pu8DiskArray, disk array data buffer
* [in] u32ArrayLength, the size of the disk array data buffer
* [out] u16OpStatus, the op status array to be returned;
* [out] pu32OpStatusCount, the count of the op status in the array
* Return: none.
* Remarks: Disk Array Op status calculation
* Unknown - disk array flag indicate disk array not present
* OK - all the physical drives in the disk array are okay
* PFA - at least one physical drive has PFA
* Degraded - some phyiscal drive(s) dead or missing, but not all
* Dead - all the physical drives are dead or missing
****************************************************************************/
void decod_getDiskArrayOpStatus(const u8 * pu8DiskArray, const u32 u32ArrayLength,
u16 u16OpStatus[], u32 * pu32OpStatusCount);
/***************************************************************************
* Function Name: decod_isDiskArrayMPEnabled
* Description: check whether Media Patrol is enabled on a disk array.
* Parameters:
* [in] u32Flags, the disk array flags.
* Return: TRUE or FALSE.
* Remarks: none.
****************************************************************************/
boolean_t decod_isDiskArrayMPEnabled(const u32 u32Flags);
/***************************************************************************
* Function Name: decod_isDiskArrayMPRunning
* Description: check whether Media Patrol is running on a disk array.
* Parameters:
* [in] u32Flags, the disk array flags.
* Return: TRUE or FALSE.
* Remarks: none.
****************************************************************************/
boolean_t decod_isDiskArrayMPRunning(const u32 u32Flags);
/***************************************************************************
* Function Name: decod_getSupportedRAIDLevels
* Description: get the supported RAID levels suppported by the disk array
* Parameters:
* [in] u32NoOfPdInArray, the number of physical drives in the array
* [out] pu16RAIDLevels, the supported RAID levels will be returned here
* [out] pu32Count, the count of the RAID levels
* Return: none.
* Remarks: none.
****************************************************************************/
void decod_getSupportedRAIDLevels(const u32 u32NoOfPdInArray,
u16 * pu16RAIDLevels, u32 * pu32Count);
/***************************************************************************
* Function Name: decod_isSupportedRAIDLevel
* Description: check whether the raid level is supported by the disk array
* Parameters:
* [in] u16RaidLevel, the raid level
* [in] u32NoOfPdInArray, the number of physical drives in the disk array
* Return: TRUE/FALSE.
* Remarks: none.
****************************************************************************/
boolean_t decod_isSupportedRAIDLevel(const u16 u16RaidLevel,
const u32 u32NoOfPdInArray);
/***************************************************************************
* Function Name: decod_getStringSupportedRAIDLevels
* Description: get the supported RAID levels suppported by the disk array
* Parameters:
* [out] pstrRAIDLevels, the string will be returned here
* [in] u32NoOfPdInArray, the number of physical drives in the disk array
* Return: none.
* Remarks: none.
****************************************************************************/
void decod_getStringSupportedRAIDLevels(char * pstrRAIDLevels,
const u32 u32NoOfPdInArray);
/***************************************************************************
* Function Name: decod_getAutoRaidLevelAndAxle
* Description: get the auto raid level based on the number of physical drives
* in the disk array
* Parameters:
* [in] u32NoOfPdInArray, the number of physical drives in the disk array
* [out] pu8RaidLevel, the auto raid level to return;
* [out] pu16NoOfAxles, the number of axles to return;
* Return: PIERR_NO_ERROR, succeeded; otherwise, failed.
* Remarks: none.
****************************************************************************/
u32 decod_getAutoRaidLevelAndAxle(const u32 u32NoOfPdInArray,
u8 * pu8RaidLevel, u16 * pu16NoOfAxles);
/***************************************************************************
* Function Name: decod_getAutoAxle
* Description: get the auto number of axles based on the number of physical
* drives in the disk array and the raid level
* Parameters:
* [in] u32NoOfPdInArray, the number of physical drives in the disk array
* [out] pu8RaidLevel, the auto raid level to return;
* [out] pu16NoOfAxles, the number of axles to return;
* Return: PIERR_NO_ERROR, succeeded; otherwise, failed.
* Remarks: none.
****************************************************************************/
u32 decod_getAutoAxle(const u32 u32NoOfPdInArray, const u8 u8RaidLevel,
u16 * pu16NoOfAxles);
/***************************************************************************
* Function Name: decod_getDiskArrayPhysicalSize
* Description: get the physical capacity of the disk array. The physical
* capacity is the total size of all the physical drives in the disk array.
* Parameters:
* [in] pu8Array, the data buffer contains the disk array info
* [out] pu64Size, the physical size to be returned in blocks
* Return: PIERR_NO_ERROR, succeeded; otherwise, failed.
* Remarks: none.
****************************************************************************/
u32 decod_getDiskArrayPhysicalSize(const u8 * pu8Array, u64 * pu64Size);
/***************************************************************************
* Function Name: decod_getDiskArrayConfigurableSize
* Description: get the total configurable size of the disk array.
* Parameters:
* [in] pu8Array, the data buffer contains the disk array info
* [out] pu64Size, the physical size to be returned in bytes
* Return: PIERR_NO_ERROR, succeeded; otherwise, failed.
* Remarks: none.
****************************************************************************/
u32 decod_getDiskArrayConfigurableSize(const u8 * pu8Array, u64 * pu64Size);
/***************************************************************************
* Function Name: decod_getPartitionConfigurableSize
* Description: get the configurable size of each partition of the disk array.
* It is the configurable size of the smallest drive in the disk array.
* Parameters:
* [in] pu8Array, the data buffer contains the disk array info
* [out] pu64PartitionSize, the parition configurable size to be returned
* in bytes
* Return: PIERR_NO_ERROR, succeeded; otherwise, failed.
* Remarks: none.
****************************************************************************/
u32 decod_getPartitionConfigurableSize(const u8 * pu8Array, u64 * pu64PartitionSize);
/***************************************************************************
* Function Name: decod_getDiskArrayAvailableSize
* Description: get the total free spaces available for configuration on the
* stordisk array
* Parameters:
* [in] pu8Array, the data buffer contains the disk array info
* [out] pu64Size, the physical size to be returned in bytes
* Return: PIERR_NO_ERROR, succeeded; otherwise, failed.
* Remarks: none.
****************************************************************************/
u32 decod_getDiskArrayAvailableSize(const u8 * pu8Array, const u32 u32ArrayLength,
u64 * pu64Size);
/***************************************************************************
* Function Name: decod_getDiskArrayPhyDrvFreeSize
* Description: get the free configurable size of a physical drive in a disk array
* Parameters:
* [in] pu8Array, the data buffer contains the disk array info
* [in] u32ArrayLength, the size of the disk array buffer
* [in] u16PhyDrvId, the physical drive id
* [out] pu64Size, the free configurable size to be returned in bytes
* Return: PIERR_NO_ERROR, succeeded; otherwise, failed.
* Remarks: none.
****************************************************************************/
u32 decod_getDiskArrayPhyDrvFreeSize(const u8 *pu8Array, const u32 u32ArrayLength,
const u16 u16PhyDrvId, u64 * pu64Size);
/***************************************************************************
* Function Name: decod_getDiskArrayMaxSupportedSize
* Description: get the size of max free slices available for configuration on
* the disk array
* Parameters:
* [in] pu8Array, the data buffer contains the disk array info
* [in] u32ArrayLength, the size of the disk array buffer
* [out] pu64Size, the max free slice size to be returned in bytes
* Return: PIERR_NO_ERROR, succeeded; otherwise, failed.
* Remarks: none.
****************************************************************************/
u32 decod_getDiskArrayMaxSupportedSize(const u8 * pu8Array, const u32 u32ArrayLength,
u64 * pu64Size);
/***************************************************************************
* Function Name: decod_getDiskArrayFreeFragments
* Description: get the free fragments of the disk array
* Parameters:
* [in] pu8Array, the data buffer contains the disk array info
* [in] u32ArrayLength, the size of the disk array buffer
* [out] pFragments, the fragment information to be returned
* Return: PIERR_NO_ERROR, succeeded; otherwise, failed.
* Remarks: none.
****************************************************************************/
u32 decod_getDiskArrayFreeFragments(const u8 * pu8Array, const u32 u32ArrayLength,
disk_array_free_fragment_t * pFragments);
/***************************************************************************
* Function Name: decod_removeFragment
* Description: remove a fragment from the fragment list
* Parameters:
* [in/out] pFragments, the fragment list
* [in] u32IndRemove, the index of the fragment to be removed
* Return: void
* Remarks: none.
****************************************************************************/
void decod_removeFragment(disk_array_free_fragment_t * pFragments,
u32 u32IndRemove);
/***************************************************************************
* Function Name: decod_breakFragments
* Description: Break a fragment list by a drive partition
* Parameters:
* [in/out] pFragments, the fragment list
* [in] u64StartBlock, drive partition start block
* [in] u64NoOfBlock, drive partition in block
* Return: void
* Remarks: none.
****************************************************************************/
u32 decod_breakFragments(disk_array_free_fragment_t * pFragments,
const u64 u64StartBlock, const u64 u64NoOfBlock);
/*********
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -