UBI: introduce the VID buffer concept
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: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
[Fix conflicts]
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent b2f7c34 commit 6248746c057f8f3533b73f1dd44d06afa0db0945
@Boris Brezillon Boris Brezillon authored on 29 Aug 2018
Sascha Hauer committed on 31 Aug 2018
Showing 7 changed files
View
drivers/mtd/ubi/attach.c
View
drivers/mtd/ubi/eba.c
View
drivers/mtd/ubi/fastmap.c
View
drivers/mtd/ubi/io.c
View
drivers/mtd/ubi/ubi.h
View
drivers/mtd/ubi/vtbl.c
View
drivers/mtd/ubi/wl.c