ITS: Fix NAND issues in ITS
Currently, only one buffer is avaible for NAND flash write
operation. It restricts that metadata cannot be updated
until file data write is finished or on the contrary. In
the case that a existing file should be deleted when creating
a file with the same file_id and difference size, it is hard
to avoid the mix write of metadata and file data. To solve
this issue, this patch adds another buffer for NAND write
operation to allow mix write of metadata and file data.
When calculating the XOR of metadata, it reads the medata
from flash. For NAND flash, the metadata is not programmed
into flash until fs_ctx->ops->flush is called. To solve the
issue, this patch add the read support from write buffer for
NAND flash.
Signed-off-by: Sherry Zhang <sherry.zhang2@arm.com>
Change-Id: Ifeab90b7f3b67a9e58773020bbc1bbe7f9444ed9
8 files changed