Question about Azure RTOS LevelX NAND API: lx_nand_flash_defragment()

YingyingLu 20 Reputation points
2023-05-19T07:59:35.1+00:00

Hello,

I'm now investigating defragment function of LevelX which aims to free up blocks to improve file system performance (maybe similar to Garbage Collection of JFFS2 file system?).

I find this function available in NOR flash, but it's not supported in NAND flash, refer to latest version 6.2.1 released on github.

/**************************************************************************/
/*  03-08-2023     Xiuwen Cai               Modified comment(s),          */
/*                                            deprecated this API,        */
/*                                            resulting in version 6.2.1 */
/*                                                                        */
/**************************************************************************/
UINT  _lx_nand_flash_defragment(LX_NAND_FLASH *nand_flash)
{
  
    LX_PARAMETER_NOT_USED(nand_flash);

    /* Return not supported.  */
    return(LX_NOT_SUPPORTED);
}

Does it mean LevelX NAND can't support defragment anymore? Is there any other alternative API, or does LevelX NAND support the same function as Garbage Collection?

Any help would be much appreciated.
Thanks!

Azure RTOS
Azure RTOS
An Azure embedded development suite including a small but powerful operating system for resource-constrained devices.
331 questions
{count} votes

Accepted answer
  1. LeelaRajeshSayana-MSFT 14,831 Reputation points Microsoft Employee
    2023-05-25T12:27:39.55+00:00

    Hi @YingyingLu Apologies for the delayed update on this. We have received the below feedback from the Product team on this change.

    LevelX NAND logic is modified in version 6.2.1. The new logic does not need defragment for now. As an alternate approach to this, we can use lx_nand_flash_sector_release to release unused sectors, and the block will be freed.

    Hope this helps. Please let us know if you have any additional questions or need further clarification. We would be glad to assist you.


    If the response helped, please do click Accept Answer and Yes. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.