diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-08-22 17:35:11 +0300 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-08-31 17:32:38 +0300 |
commit | 8089ed792832e5d3dd219da435c5a08d969662b4 (patch) | |
tree | 2d9b661683a9e687e308d90be791a61f13b8a18a /fs/ubifs/lpt_commit.c | |
parent | 4b3e58a6d6c62b5457ff876fdfc79f66fff04cd2 (diff) |
UBIFS: fix power cut emulation for mtdram
The power cut emulation did not work correctly because we corrupted more than
one max. I/O unit in the buffer and then wrote the entire buffer. This lead to
recovery errors because UBIFS complained about corrupted free space. And this
was easily reproducible on mtdram because max. write size is very small there
(64 bytes), and we could easily have a 1KiB buffer, corrupt 128 bytes there,
and then write the entire buffer.
The fix is to corrupt max. write size bytes at most, and write only up to the
last corrupted max. write size chunk, not the entire buffer.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'fs/ubifs/lpt_commit.c')
0 files changed, 0 insertions, 0 deletions