Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1264690ybm; Tue, 21 May 2019 11:09:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqx17c7QVx0cCkvzVYbhr/uvwjM1+z3BkjddkMG/SexeTGJvQzI6bqFUZhH6Dlka8D3b9dfe X-Received: by 2002:a63:f315:: with SMTP id l21mr84091787pgh.417.1558462154403; Tue, 21 May 2019 11:09:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558462154; cv=none; d=google.com; s=arc-20160816; b=QbfRZ0+AlzgALrSCPcvKJFoJHlkFW9TvGI0jwjWyMwbfYbUTewUCvPwu30tFEc23te rroZAS7QFNUX5lrLIssPNW4O8wJB7UeZbxZnFybpYWzPFNg9u0rfHMChpQfy0zfjSUOs 1q3+k3m1lSXZWm+x9NAgXWIzUe7IBV9XvX+VUrfoWSfQbDmJAZVhciVMEWOvLy+c8xAP 3nlP1HKRlJ4qjXT6Z10ZDE5a7h2r+cV2iziBmN71Csi08K4JLYDBGU4t5P8YoQU4d5nj azM90RGF3bTymtjcGVem6rSI/eKgMmJOcH46Rz1UzcU2EKo8v9CWlJ+Bty6WkdPivBkV d4Mg== 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=XFJeaV9KtbkO8046Am5eCuj/bSxCPsTP2hJD6Hfdg78=; b=Opu0Sf+r1byiCqrzO3BQS2mOgT7rNczW+W6yYbBXbUGP3Vayyx9oRGudb+b9pDlT96 dcRdaFmpW/1xgr5Roy6GKLQ6tFa5nXHbNETMKJjeerJA55/5WAHwDy1N4p9NEA4a2BLW 6ZvAxYCG2B++FfLK9zg5ovhWfLoj3pivD3iJDUrxY1Uz87ScDSKT9BlHCfHeNWZ/8tKY RWweCXEJT2rh/7DBE/5fU7Z+72XtYcntSC0wdF3cOOQar3X/o3400T1XmB3llVqIoUaw GsQf+9WQTMKRkeSaA7hK0KCweArdjpssqU7qZU5fRTzhNdF8jh5ADSH7T5kV23tzlA73 rpbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hb5uSo+B; 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 f34si8584999pgm.114.2019.05.21.11.08.59; Tue, 21 May 2019 11:09:14 -0700 (PDT) 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=hb5uSo+B; 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 S1729220AbfEUSG3 (ORCPT + 99 others); Tue, 21 May 2019 14:06:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:55640 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727898AbfEUSG2 (ORCPT ); Tue, 21 May 2019 14:06:28 -0400 Received: from localhost (unknown [104.132.1.68]) (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 CA036217D9; Tue, 21 May 2019 18:06:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558461987; bh=LrTl2rHkLKG/Z0EywGv7rApN2wATqjxr8QL5bVuf8yw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hb5uSo+BF8rXr2ggilNGd0Jh7cMrqh0GnNCsrlzqJ0Ey9vlqXBEJmkJH2ysmT5uex 3qQ2ZwwTaqavcn9GWwPU+Q2K7l2pl7XzELj6a1nUDNkSB4yD7rhFdU5GO2bgbRy+bb H30N2LdMhfMTz7QnywXiVCTPXiYbqlh3oL2Omet0= From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: Jaegeuk Kim Subject: [PATCH 2/2] f2fs: allow ssr block allocation during checkpoint=disable period Date: Tue, 21 May 2019 11:06:25 -0700 Message-Id: <20190521180625.10562-2-jaegeuk@kernel.org> X-Mailer: git-send-email 2.19.0.605.g01d371f741-goog In-Reply-To: <20190521180625.10562-1-jaegeuk@kernel.org> References: <20190521180625.10562-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 This patch allows to use ssr during checkpoint is disabled. Signed-off-by: Jaegeuk Kim --- fs/f2fs/gc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 963fb4571fd9..1e029da26053 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -387,7 +387,8 @@ static int get_victim_by_default(struct f2fs_sb_info *sbi, goto next; /* Don't touch checkpointed data */ if (unlikely(is_sbi_flag_set(sbi, SBI_CP_DISABLED) && - get_ckpt_valid_blocks(sbi, segno))) + get_ckpt_valid_blocks(sbi, segno) && + p.alloc_mode != SSR)) goto next; if (gc_type == BG_GC && test_bit(secno, dirty_i->victim_secmap)) goto next; -- 2.19.0.605.g01d371f741-goog