From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753513AbdJSNuA (ORCPT ); Thu, 19 Oct 2017 09:50:00 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45968 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753216AbdJSNt4 (ORCPT ); Thu, 19 Oct 2017 09:49:56 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yunlong Song , Jaegeuk Kim , Sasha Levin Subject: [PATCH 4.9 16/51] f2fs: do SSR for data when there is enough free space Date: Thu, 19 Oct 2017 15:48:37 +0200 Message-Id: <20171019134842.325475341@linuxfoundation.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171019134841.383925150@linuxfoundation.org> References: <20171019134841.383925150@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yunlong Song [ Upstream commit 035e97adab26c1121cedaeb9bd04cf48a8e8cf51 ] In allocate_segment_by_default(), need_SSR() already detected it's time to do SSR. So, let's try to find victims for data segments more aggressively in time. Signed-off-by: Yunlong Song Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1263,7 +1263,7 @@ static int get_ssr_segment(struct f2fs_s struct curseg_info *curseg = CURSEG_I(sbi, type); const struct victim_selection *v_ops = DIRTY_I(sbi)->v_ops; - if (IS_NODESEG(type) || !has_not_enough_free_secs(sbi, 0, 0)) + if (IS_NODESEG(type)) return v_ops->get_victim(sbi, &(curseg)->next_segno, BG_GC, type, SSR);