diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-01-24 11:56:11 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-02-11 23:15:00 +0100 |
commit | 577e349514452fa3fcd99fd06e587b02d3d1cf28 (patch) | |
tree | fe4e86d3f56b8050c85b1f5fb76117d6e99c5aa9 /firmware/tigon | |
parent | f2fs: save device node number into f2fs_inode (diff) | |
download | linux-577e349514452fa3fcd99fd06e587b02d3d1cf28.tar.xz linux-577e349514452fa3fcd99fd06e587b02d3d1cf28.zip |
f2fs: prevent checkpoint once any IO failure is detected
This patch enhances the checkpoint routine to cope with IO errors.
Basically f2fs detects IO errors from end_io_write, and the errors are able to
be occurred during one of data, node, and meta page writes.
In the previous code, when an IO error is occurred during writes, f2fs sets a
flag, CP_ERROR_FLAG, in the raw ckeckpoint buffer which will be written to disk.
Afterwards, write_checkpoint() will check the flag and remount f2fs as a
read-only (ro) mode.
However, even once f2fs is remounted as a ro mode, dirty checkpoint pages are
freely able to be written to disk by flusher or kswapd in background.
In such a case, after cold reboot, f2fs would restore the checkpoint data having
CP_ERROR_FLAG, resulting in disabling write_checkpoint and remounting f2fs as
a ro mode again.
Therefore, let's prevent any checkpoint page (meta) writes once an IO error is
occurred, and remount f2fs as a ro mode right away at that moment.
Reported-by: Oliver Winker <oliver@oli1170.net>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Reviewed-by: Namjae Jeon <namjae.jeon@samsung.com>
Diffstat (limited to 'firmware/tigon')
0 files changed, 0 insertions, 0 deletions