Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2077789ybv; Fri, 14 Feb 2020 11:02:24 -0800 (PST) X-Google-Smtp-Source: APXvYqyUZVGigORX2OgSm0zBHy5d5CqdRXguHAixHc07VsSUrkkjY/0v07mqjIvcllUoztgUisic X-Received: by 2002:a05:6830:11:: with SMTP id c17mr3388689otp.360.1581706943755; Fri, 14 Feb 2020 11:02:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581706943; cv=none; d=google.com; s=arc-20160816; b=A/A/y2i4/tUqizA10LtUF2uP/5lkS9mVr5RZK2lqGESikJstQzuKpVFQosZoKeoGGs l35oMiC2VCClbt+NiKDugcyGnLdC5HJI3OOb+GLxCT5bDezu5ADzq/wE6C4TEFwjSQBT siYfi5oeC3jElms20+RU7ACKs3gLoB+t0AfvOM1TT/IXOZg/5XK5+daj4MkhaJ+JYZHt kq7SDj39W2SJKj8jmpt8MOm7mZZkQSqppfg59da2vG+lMcQHSD3vTa08TxRk70OQ2DMp TTONikjW1OBulhHMHdCN//QC2KR4QsK2JZtjjSCv+wTEI0RSironLmnRv+HwSc0elUV/ LC8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8W6hpucn3SvzTmC7Sqi6v3hWEqyWffzlARR/rNdJy9g=; b=OltvE2joWt2kZBENU633JIuFVPQ6K9Tl6S/fnrZej38DHUU+jrMhvQsZcKLoCUsKUs /7gCKW1inAhOH5D9otjQspBAuKN/57h2PyQ08tMAHBRYRFl5FCgq8oAJqem9QkOIpUdG 0E79WPDkzxDTEqBzlgtsSWhtqU1rOraOxhmpGwML1CqKTj+PGoW+vTZ2IJrbhrzQwii8 bk+7p6aWcMZ2FhJqH4H/NLMvI65nelxoeLe0Qv8N19hdV2IwQzrZASoqUnrydExyzurA /0jverQkrDjnWDVkxRemQUn9hFOcVFKyGL3wZHxxI2XKygQJL7zIQX3oG9M9qjafed3x tQpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iYPOmT0w; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s11si3209693oic.57.2020.02.14.11.02.11; Fri, 14 Feb 2020 11:02:23 -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; dkim=pass header.i=@kernel.org header.s=default header.b=iYPOmT0w; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729865AbgBNS67 (ORCPT + 99 others); Fri, 14 Feb 2020 13:58:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:46158 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729210AbgBNS66 (ORCPT ); Fri, 14 Feb 2020 13:58:58 -0500 Received: from localhost (unknown [104.132.1.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 755A62168B; Fri, 14 Feb 2020 18:58:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581706738; bh=3g/vPR1HVaaTZ+7nebbZDxLTqe8TuTFwsIwIOwOIBlE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iYPOmT0wjyai78N5uGcYj3LSCbfJuabxCruqDX3QyxlmUJDnL/qJyCIIxiiERDQxy R1dKCHmBs4Rl5fcrRhwNe325fijbinZJbL8n9y1cm7uxEFLEZT0EydFb10kaLuhOW2 PbDINOUs1vq5SCJdg72sdVsL03AG4VmGDzXbqISo= From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: Jaegeuk Kim Subject: [PATCH 3/3] f2fs: skip migration only when BG_GC is called Date: Fri, 14 Feb 2020 10:58:55 -0800 Message-Id: <20200214185855.217360-3-jaegeuk@kernel.org> X-Mailer: git-send-email 2.25.0.265.gbab2e86ba0-goog In-Reply-To: <20200214185855.217360-1-jaegeuk@kernel.org> References: <20200214185855.217360-1-jaegeuk@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org FG_GC needs to move entire section more quickly. Signed-off-by: Jaegeuk Kim --- fs/f2fs/gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index bbf4db3f6bb4..1676eebc8c8b 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1203,7 +1203,7 @@ static int do_garbage_collect(struct f2fs_sb_info *sbi, if (get_valid_blocks(sbi, segno, false) == 0) goto freed; - if (__is_large_section(sbi) && + if (gc_type == BG_GC && __is_large_section(sbi) && migrated >= sbi->migration_granularity) goto skip; if (!PageUptodate(sum_page) || unlikely(f2fs_cp_error(sbi))) -- 2.25.0.265.gbab2e86ba0-goog