Received: by 10.223.164.202 with SMTP id h10csp366678wrb; Fri, 17 Nov 2017 01:52:38 -0800 (PST) X-Google-Smtp-Source: AGs4zMYe2Ft07biCCJWJ5phm1u41cOAi2FQsoneLxNrRKyky5XWU1sm8dqfFM6UhgFJ8koSV894G X-Received: by 10.99.126.11 with SMTP id z11mr4599588pgc.281.1510912358672; Fri, 17 Nov 2017 01:52:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510912358; cv=none; d=google.com; s=arc-20160816; b=G+NlfTmCyig5CFvdQVfsvaVlDLOj9P06UBwG+rHphyya0Z9IQ1UD7MXhUNNzEgdvgK 2gKiv5Kg9r2gUVraEM13GNLEgRDqFuyaeO3ZsJ+JUwdeXuhiH80eItWYp3mbXIhaZ1RR ZdI+GwV8gqlL+xxnvS+W/gDlwxX9pB00V0b+3kygP4clEbVCgCYF51/o91EcxClekj0d DIen2vVZa7kH9JSA2S4+7BS2OGDeGcHJ7Ihi0cCcIQyrCw3IJZhF//cTy9CgltRuPtOk rBObd0vgK6MLHEC1pvKJbzk/SB2elY9fq3cWDW0TGDRvW2lhSlTmWIK+1/+ntFPDudJK 9U9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=P+XnupUJ4zolQLYnubPIGzDjy5mNmTNiIOqhtFUcukA=; b=aNq0rffFf2/t/2asBTBTkG2zjuCPEaIkrTcbKZ5xq2sKdejeyuAxjJ6xgMN3EnpFN8 t8/ZoVfHmQL73Yg+AuS0SCmGervv3OCP0yzp2JnTabAbeCB6/deTorkvIL++fPJDw2hq 3MP3+ptoCZU68Mvx//qH3GOYKdNbJ2xc77iG0GEdg5lx7C3v2ioH+Fa4mY9ko32BBe2i mN6aq0foVC/7Mg2JSeaIzHU1wcRY8pSgzd34iatDGO9zBVAUCO79yQ6mznHTs9QDy5jp zkpAYx6gL2lIaTi6rYfRCqJfZdOIA7TSuo94Q7S84lkXttYWlwudiGWrpPKe79j8qbWr kQ3A== 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 k185si2259312pgk.665.2017.11.17.01.52.25; Fri, 17 Nov 2017 01:52:38 -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 S1754565AbdKQBKc (ORCPT + 91 others); Thu, 16 Nov 2017 20:10:32 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:10991 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754265AbdKQBKZ (ORCPT ); Thu, 16 Nov 2017 20:10:25 -0500 Received: from 172.30.72.59 (EHLO DGGEMS402-HUB.china.huawei.com) ([172.30.72.59]) by dggrg05-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id DLC50933; Fri, 17 Nov 2017 09:10:22 +0800 (CST) Received: from huawei.com (10.107.193.250) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.361.1; Fri, 17 Nov 2017 09:09:13 +0800 From: Yunlong Song To: , , , , CC: , , , , Subject: [PATCH v3 RESEND] f2fs: add bug_on when f2fs_gc even fails to get one victim Date: Fri, 17 Nov 2017 09:09:08 +0800 Message-ID: <1510880948-154538-1-git-send-email-yunlong.song@huawei.com> X-Mailer: git-send-email 1.8.5.2 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.107.193.250] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020201.5A0E36FE.014F,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: 4a2d7a372b6806f9391b94835a22b20d Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; } -- 1.8.5.2 From 1583583423875956937@xxx Thu Nov 09 10:20:39 +0000 2017 X-GM-THRID: 1582319483972251768 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread