• Boris Brezillon's avatar
    UBI: introduce the VID buffer concept · 3291b52f
    Boris Brezillon authored
    Currently, all VID headers are allocated and freed using the
    ubi_zalloc_vid_hdr() and ubi_free_vid_hdr() function. These functions
    make sure to align allocation on ubi->vid_hdr_alsize and adjust the
    vid_hdr pointer to match the ubi->vid_hdr_shift requirements.
    This works fine, but is a bit convoluted.
    Moreover, the future introduction of LEB consolidation (needed to support
    MLC/TLC NANDs) will allows a VID buffer to contain more than one VID
    header.
    
    Hence the creation of a ubi_vid_io_buf struct to attach extra information
    to the VID header.
    
    We currently only store the actual pointer of the underlying buffer, but
    will soon add the number of VID headers contained in the buffer.
    Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
    Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
    3291b52f
fastmap.c 39.7 KB