2013/1/24, Jaegeuk Kim <jaegeuk.kim@xxxxxxxxxxx>: > Change log from v1: > o Fix error handling cases > o Remove unnecessary parameters and return values > > From 90c96bb70ac874216ef33a9af671d221c4d153bb Mon Sep 17 00:00:00 2001 > From: Jaegeuk Kim <jaegeuk.kim@xxxxxxxxxxx> > Date: Thu, 24 Jan 2013 19:56:11 +0900 > Subject: [PATCH] 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@xxxxxxxxxxx> > Signed-off-by: Jaegeuk Kim <jaegeuk.kim@xxxxxxxxxxx> Nice, fsck.f2fs is big news. Reviewed-by: Namjae Jeon <namjae.jeon@xxxxxxxxxxx> Thanks > --- -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html