lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <be5636e5-da54-3159-83f7-b5c1a98ddca6@huawei.com>
Date:   Tue, 31 Oct 2017 10:05:23 +0800
From:   Yunlong Song <yunlong.song@...wei.com>
To:     Chao Yu <yuchao0@...wei.com>, <jaegeuk@...nel.org>,
        <chao@...nel.org>, <yunlong.song@...oud.com>
CC:     <miaoxie@...wei.com>, <bintian.wang@...wei.com>,
        <linux-fsdevel@...r.kernel.org>,
        <linux-f2fs-devel@...ts.sourceforge.net>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] f2fs: collect prefree segments to avoild write
 checkpoint fail

So I use CHECK_FS config to control it. When CHECK_FS is off, all the 
other f2fs_bug_on also
only printk WARNING info rather than trigger BUG_ON.

On 2017/10/31 9:59, Chao Yu wrote:
> On 2017/10/31 9:33, Yunlong Song wrote:
>> ping...
>>
>> On 2017/9/1 20:00, Yunlong Song wrote:
>>> In come corner case, the reserved segments are used to do gc, and there are
>>> not enough free segments for write checkpoint to finish its job, then the
>>> gc process will fail to change the prefree segments to free segments.
> I agreed to use this in production for robustness, but for upstream, it's better
> to investigate and fix this issue rather than covering up it.
>
> Thanks,
>
>>> Signed-off-by: Yunlong Song <yunlong.song@...wei.com>
>>> ---
>>>    fs/f2fs/gc.c | 10 ++++++++++
>>>    1 file changed, 10 insertions(+)
>>>
>>> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
>>> index cd147e7..6552b04 100644
>>> --- a/fs/f2fs/gc.c
>>> +++ b/fs/f2fs/gc.c
>>> @@ -1056,6 +1056,16 @@ int f2fs_gc(struct f2fs_sb_info *sbi, bool sync,
>>>    	if (!sync) {
>>>    		if (has_not_enough_free_secs(sbi, sec_freed, 0)) {
>>>    			segno = NULL_SEGNO;
>>> +#ifndef CONFIG_F2FS_CHECK_FS
>>> +			if (prefree_segments(sbi) &&
>>> +				has_not_enough_free_secs(sbi,
>>> +					reserved_sections(sbi), 0)) {
>>> +				ret = write_checkpoint(sbi, &cpc);
>>> +				if (ret)
>>> +					goto stop;
>>> +				sec_freed = 0;
>>> +			}
>>> +#endif
>>>    			goto gc_more;
>>>    		}
>>>    
>
> .
>

-- 
Thanks,
Yunlong Song


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ