Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp418251ybm; Wed, 22 May 2019 05:34:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqyr5jrOEkYDepHpPhiA3KD36U7qkJ/AQSGZgHvL1fUwmKeNNmEM2QrkihgxkJ2KHM7tSgeG X-Received: by 2002:a65:624f:: with SMTP id q15mr90092624pgv.436.1558528471379; Wed, 22 May 2019 05:34:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558528471; cv=none; d=google.com; s=arc-20160816; b=jqwE1qaJxrK8w/Ulu1A28wKBUzu8yrN/pSpYOXxwORiy3Ch5LSWTjJOMDcNaktAXyS ewn4gP2i77Ln9Zr7I+JYyKz+/F0LCO3gnvY9UOd/f1hzR4Y6lvV0m6fS24PiPV3ZHmeS 8Z8LSVOmxh7yoDLNPaeiIlKvcoBS4ubvPOgZOxY+ISQt2lA+gDx3iJGvfZk7G3qNugaA S99XCTruU06wkkuFoWgBqIzQ2Tw32Mk17iicqXs3edsx2vz8IcwWu9dP6qXyrCZOFXhf K5+0dmX9prAGhAEp8iRK1MmS7cAncbMsFlt6qLnZ1Yhj68rux8BRQEwZUBkQNvqHGnJP QRtw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=tIymDYDU3QN59haYyeN5lQkZ7eppFRaweDzC5o10/Jc=; b=J4QSWvCKChPtsQ6g4eEUC7NKhrl5/RyDnex1RZWobzNf/SKA4Z8oaE7IQRKddcDdxc zFnZdPEGEc6/u6VRRPlFvy5/BhiFhvoHRCtUopv2UxltdNtoVUyADt9B3LeWJ1GP/cqC 3PnoOuEGIMNoRKOoWV3IHJNQaWnVgVJNiN6m2WTHKLv5dJzPttc3VmNIaBikqCt8ZFtp a4unvlFgV0bBm8ksosNfIclWUhKxgY5HkdEdtwARUkPpLfAStCInlJb+lqdj16pMfnl/ AdbD5eTxkwlkTLc64bTLRaVKIBfHRnsinRkP+3Nj5OgjnrFHhkch0sPIBr8J9xnGJT4W NiTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yzHOC2O3; 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 s21si21077930pgm.154.2019.05.22.05.34.15; Wed, 22 May 2019 05:34:31 -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=yzHOC2O3; 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 S1729340AbfEVMdB (ORCPT + 99 others); Wed, 22 May 2019 08:33:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:34616 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728914AbfEVMdB (ORCPT ); Wed, 22 May 2019 08:33:01 -0400 Received: from [192.168.0.101] (unknown [49.77.233.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D7A992173C; Wed, 22 May 2019 12:32:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558528380; bh=7Zt5mFnKGpFUyLLmEh/OXRYTSOMLrj8rJD3n8swXUfc=; h=Subject:To:References:From:Date:In-Reply-To:From; b=yzHOC2O3R3OLQEJrB35Gcz5qtnVVlhR47yFsPcd3k7fR5yL45kUjGxl3MHQS5iDXH uloVw3UG3yfi3Lw/d+McYNFtiWcmoXaPQFfxIuTAD9dPF94q7UstM+gMvJLO3qrzCM BGx6VhaB0BJap+z14TJDaTUAdAhanwaS8DjKZMaM= Subject: Re: [f2fs-dev] [PATCH 2/2] f2fs: allow ssr block allocation during checkpoint=disable period To: Jaegeuk Kim , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net References: <20190521180625.10562-1-jaegeuk@kernel.org> <20190521180625.10562-2-jaegeuk@kernel.org> From: Chao Yu Message-ID: Date: Wed, 22 May 2019 20:32:54 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190521180625.10562-2-jaegeuk@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-5-22 2:06, Jaegeuk Kim wrote: > 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)) p.alloc_mode == LFS will be more straightforward. :) Anyway, Reviewed-by: Chao Yu Thanks, > goto next; > if (gc_type == BG_GC && test_bit(secno, dirty_i->victim_secmap)) > goto next; >