Write object headers with stored file extents charles_experiment
authorCharles Manning <cdhmanning@gmail.com>
Mon, 7 Mar 2016 19:03:06 +0000 (08:03 +1300)
committerCharles Manning <cdhmanning@gmail.com>
Mon, 7 Mar 2016 19:03:06 +0000 (08:03 +1300)
commit33308768bd24abe4e1f59c5025a3dd824119ae1d
treeb91f416ae170eb86ee1ea4e4db59aeba120e8321
parent03e4ccdbfa08eb7f504d36732727b2fda4352a3e
Write object headers with stored file extents

Previously file object headers were being written with file extents
rather than stored extents.

This could lead to situations where the data in the cache was not yet
written to flash but had been accounted for in the object header file
size.

Under power fail this could cause zero-filled blobs at the end of a file.

This change tracks the stored file size and only write object headers
reflecting the extents of the file that has actually been stored to flash,
thus avoiding the holes.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
yaffs_guts.c
yaffs_guts.h
yaffs_yaffs1.c
yaffs_yaffs2.c