Received: by 10.223.164.202 with SMTP id h10csp5980572wrb; Tue, 21 Nov 2017 19:52:08 -0800 (PST) X-Google-Smtp-Source: AGs4zMbW8WP9VBs3KUEVCkABMR5ZemMsyNv+Xix3fxg/j1nv9it4EJe7oZeozbDjWLQm2GPkS5vb X-Received: by 10.99.127.91 with SMTP id p27mr19106597pgn.1.1511322728091; Tue, 21 Nov 2017 19:52:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511322728; cv=none; d=google.com; s=arc-20160816; b=o0wNBXp0x46K/wcmWqjfBEBbxkxX2i4Uvnuc4lJkuCELD5RLhMrrfkUGPQ4bqihbmv 3LWJpn+Y/DBBfkgQS0KTwr4qK71mKTCQsTVtbqsntl6L4LDe05ic+YBj8ZRXz3FWYCyW D6obZ2erQPpLr0ArQR5GX/J38lQCm2r4yGto5HJ4IqAH+WvfFG/6/pENbVtYMMiE3OyH QlZK6rwSvWPROnVGjE0W8BSLQqr8VWIybZ03tGShZrEFmfJDdkUveTeHtylEABBAg8mz Xx2X8TwrKvgpVnS4iQDzuEAh0sUXRZ4zjKSKkkojgbJ281lf+7SQJVzTfWR41QxOhVS2 v0qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=OWfH0LtSR2iYdKHYqF1HVfUYXloX3urEaqinhaC3aF4=; b=VTjh4KE8og2NWT3aA2e+r3ZJU7t+hiSUE7b08z2JgZWGATFZJMDgliMW4a1cA6XgQv /3qEaqFGq7cE1kAEox+SxchYBukfiRuTvPmyt3UpyO55KqNTLxGiO/gVOJtsX8tnsfKC KA2iz8Adrn8HIBu5lJ6BZDJ/OaUFHnjo/0233pyHB+WhtvFA8mEtSlJB+mtpZxGIuPe0 X0E81KPFZPW0i+fxGCHSqxvbZ9a5CZ5unXmNZ933R57r6Q179gMO9Ffcgdu9cfnl+4Es 8FzqV6Ad9jxRRxv4Oh8kc9wk6QhiyFm7SC0YHbgPpixWHnkaWsRZKS2Ml2eiI73ldfVH mx5g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k70si12409822pgc.344.2017.11.21.19.51.56; Tue, 21 Nov 2017 19:52:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751544AbdKVDvK (ORCPT + 76 others); Tue, 21 Nov 2017 22:51:10 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:11018 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751460AbdKVDvI (ORCPT ); Tue, 21 Nov 2017 22:51:08 -0500 Received: from 172.30.72.60 (EHLO DGGEMS409-HUB.china.huawei.com) ([172.30.72.60]) by dggrg05-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id DLK30879; Wed, 22 Nov 2017 11:50:40 +0800 (CST) Received: from [127.0.0.1] (10.111.220.140) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.361.1; Wed, 22 Nov 2017 11:50:33 +0800 Subject: Re: [PATCH v3 RESEND] f2fs: add bug_on when f2fs_gc even fails to get one victim To: , , , CC: , , , , References: <1510880948-154538-1-git-send-email-yunlong.song@huawei.com> From: Yunlong Song Message-ID: Date: Wed, 22 Nov 2017 11:50:10 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1510880948-154538-1-git-send-email-yunlong.song@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.111.220.140] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.5A14F411.0053,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 959109e4e0b9aeb5f2a9b594f5f434c4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ping again... On 2017/11/17 9:09, Yunlong Song wrote: > This can help to find potential bugs on some corner case. > > Signed-off-by: Yunlong Song > --- > fs/f2fs/gc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c > index 5d5bba4..c89128b 100644 > --- a/fs/f2fs/gc.c > +++ b/fs/f2fs/gc.c > @@ -1035,6 +1035,7 @@ int f2fs_gc(struct f2fs_sb_info *sbi, bool sync, > goto stop; > } > if (!__get_victim(sbi, &segno, gc_type)) { > + f2fs_bug_on(sbi, !total_freed && has_not_enough_free_secs(sbi, 0, 0)); > ret = -ENODATA; > goto stop; > } -- Thanks, Yunlong Song From 1584306437455651366@xxx Fri Nov 17 09:52:38 +0000 2017 X-GM-THRID: 1584306437455651366 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread