Hi Ju Hyung,

On 2019/4/15 21:07, Park Ju Hyung wrote:
> While experimenting with ICE/FBE + f2fs on an Android device,
> I was able to reliably reproduce quota corruption during
> initial setup wizard.
> 
> During 10 times of factory resets, quota flushes failed 5 times each
> in average.

I knew this works in scenario cell phone suffers sudden power-cut frequently,
actually, in a normal case, if there is race in between checkpoint() and quota
updater, checkpoint() may suffer longer delay than before.

So I suggest we keep the logic as it is, since sudden power-cut is not a common
case, even in such case, quota sysfile is corrupted, we have another chance to
repair it with fsck-tools, right?

Thanks,

> 
> Add a wait for uncongestion on quota flush retries to resolve the issue.
> 
> Signed-off-by: Park Ju Hyung <[email protected]>
> ---
>  fs/f2fs/checkpoint.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
> index a98e1b02279e..e63cfab6be5d 100644
> --- a/fs/f2fs/checkpoint.c
> +++ b/fs/f2fs/checkpoint.c
> @@ -1130,6 +1130,7 @@ static int block_operations(struct f2fs_sb_info *sbi)
>       f2fs_lock_all(sbi);
>       if (__need_flush_quota(sbi)) {
>               f2fs_unlock_all(sbi);
> +             congestion_wait(BLK_RW_ASYNC, HZ/50);
>               cond_resched();
>               goto retry_flush_quotas;
>       }
> 


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

Reply via email to