Hi Weichao,

On 2018/7/30 18:46, Weichao Guo wrote:

Could you check and adjust your server's date, it looks like we are receiving
patch from future. ;)

> We may encounter both checkpoints invalid in such a case:
> 1. write checkpoint A, B, C;
> 2. sudden power-cut during write checkpoint D;
> 3. fsck changes the total block count of checkpoint C;
> 4. sudden power-cut during fsck write checkpoint C in place
> 
>  ---------           ---------
> |  ver C  |         |  ver D  |
> |   ...   |         |   ...   |
> | content |         | content |
> |   ...   |         |   ...   |
> |  ver C  |         |         |
> |  ver A  |         |  ver B  |
>  ---------           ---------
> 
> As the total # of checkpoint C is changed, an old cp block
> like ver A or an invalid cp block may be referenced.
> To avoid both checkpoints invalid, and considering fsck should
> not update the checkpoint version, fsck could write checkpoint
> out of place first and then write checkpoint in place. This
> makes sure the file system is fixed by fsck and at least one
> of the two checkpoints is valid.
> 
> Signed-off-by: Weichao Guo <guoweic...@huawei.com>
Reviewed-by: Chao Yu <yuch...@huawei.com>

Thanks,


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to