Hi Ritesh,

On 2018/11/19 14:02, Ritesh Harjani wrote:
> In case of any inconsistent node page entries found,
> call f2fs_stop_checkpoint to further avoid any corruption.
> 
> Signed-off-by: Ritesh Harjani <[email protected]>
> ---
>  fs/f2fs/node.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
> index d338740..29b56ef 100644
> --- a/fs/f2fs/node.c
> +++ b/fs/f2fs/node.c
> @@ -1369,6 +1369,7 @@ static struct page *__get_node_page(struct f2fs_sb_info 
> *sbi, pgoff_t nid,
>                       ofs_of_node(page), cpver_of_node(page),
>                       next_blkaddr_of_node(page));
>               err = -EINVAL;
> +             f2fs_stop_checkpoint(sbi, false);

I think it needs more information to proof filesystem-level metadata is
corrupted, otherwise it only indicate that current node is corrupted...

I guess that we can verify ni.blk_addr validity in SIT to check consistent
between NAT and SIT, then we can decide to stop checkpoint?

BTW, I suspect there is still app/system program bypass filesystem and use
block layer interface to operate data partition directly, e.g. fiemap/bmap
+ write blkaddr, since block migration during f2fs GC, such operation
should be avoided. :)

Thanks,

>  out_err:
>               ClearPageUptodate(page);
>               f2fs_put_page(page, 1);
> 



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to