Skip to content

Implement mmap for BCH and FTL #8019

@xiaoxiang781216

Description

@xiaoxiang781216

After #8000, mmap/munmap is the first-class interface, since block/mtd(e.g. RAM disk or XIP flash) device may support mmap too, It could be useful to:

  1. Add mmap callback to block_operations and mtd_dev_s:
    https://github.com/apache/nuttx/blob/master/include/nuttx/fs/fs.h#L260-L274
    https://github.com/apache/nuttx/blob/master/include/nuttx/mtd/mtd.h#L141-L187
  2. Forward mmap from file_operations to block_operations to mtd_dev_s:
    https://github.com/apache/nuttx/blob/master/drivers/bch/bchdev_driver.c#L81
    https://github.com/apache/nuttx/blob/master/drivers/mtd/ftl.c#L106-L117

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions