From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 569CCC2D0EE for ; Tue, 31 Mar 2020 09:06:47 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 26D98208E0; Tue, 31 Mar 2020 09:06:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="BUTS8PKk"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="K9UXRm6u"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="qxAmKx+I" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 26D98208E0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1jJCr8-0008AI-IW; Tue, 31 Mar 2020 09:06:46 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jJCr6-0008AB-UI for linux-f2fs-devel@lists.sourceforge.net; Tue, 31 Mar 2020 09:06:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=OlOD3aygKk+kpGLkhsVi4IEdqcNCdHsjR4aqyj00l7I=; b=BUTS8PKkAVjho9P84R5WkJfj+E +mOsbzqlXsBhLx7QBna34ixk+PbKL6z2UGP6pGqNEzlMIjsxLsz/MUdzgJrRyqzd0y21c7QTckQB9 GgnwfMLEbTHQvn+X5fNDQEwb4k3tBzSap/WdE/uVEp8tLxtO+CJTdmVNgfkJp3bxs7dw=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=OlOD3aygKk+kpGLkhsVi4IEdqcNCdHsjR4aqyj00l7I=; b=K9UXRm6uSkOUVofKPogjsUQ/zj 24fWzGBAT2cGzIahb9G2aRMRlWn3I/XI3Z/WPlY6jq7hFLw2im6n39zrRbZY/KSWYMKBoYpjvZ4qy Goe0HY+Kxvox5NJX3pnD6JiWgBJJjIgiBCBDpi1NCHEoAYDOQUODrW94dshAbFBGCbpc=; Received: from mail26.static.mailgun.info ([104.130.122.26]) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1jJCqw-002iJO-RE for linux-f2fs-devel@lists.sourceforge.net; Tue, 31 Mar 2020 09:06:44 +0000 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1585645596; h=In-Reply-To: Content-Type: MIME-Version: References: Message-ID: Subject: Cc: To: From: Date: Sender; bh=OlOD3aygKk+kpGLkhsVi4IEdqcNCdHsjR4aqyj00l7I=; b=qxAmKx+Iga9dL2Opd0PPe6zfFxxFwOW3C96qEfJeVtfeEKxW440TvTM2gBPhhhCmf3/32oyU fOhhG9pm02lmSW8sWkaMEI5b+u6E1ce212DAlds/ZsmxrLaIMwu6Fr1FuIFnf46wZe6KXN4v ZytLnugoLawJPWsbbM5RMtrh080= X-Mailgun-Sending-Ip: 104.130.122.26 X-Mailgun-Sid: WyI2M2Y4ZiIsICJsaW51eC1mMmZzLWRldmVsQGxpc3RzLnNvdXJjZWZvcmdlLm5ldCIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5e830809.7f3e5f693ca8-smtp-out-n03; Tue, 31 Mar 2020 09:06:17 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 44737C433F2; Tue, 31 Mar 2020 09:06:17 +0000 (UTC) Received: from codeaurora.org (blr-c-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: stummala) by smtp.codeaurora.org (Postfix) with ESMTPSA id 52DABC433D2; Tue, 31 Mar 2020 09:06:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 52DABC433D2 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=stummala@codeaurora.org Date: Tue, 31 Mar 2020 14:36:08 +0530 From: Sahitya Tummala To: Jaegeuk Kim Message-ID: <20200331090608.GZ20234@codeaurora.org> References: <1585219019-24831-1-git-send-email-stummala@codeaurora.org> <20200331035419.GB79749@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200331035419.GB79749@google.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Headers-End: 1jJCqw-002iJO-RE Subject: Re: [f2fs-dev] [PATCH] f2fs: prevent meta updates while checkpoint is in progress X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Mon, Mar 30, 2020 at 08:54:19PM -0700, Jaegeuk Kim wrote: > On 03/26, Sahitya Tummala wrote: > > allocate_segment_for_resize() can cause metapage updates if > > it requires to change the current node/data segments for resizing. > > Stop these meta updates when there is a checkpoint already > > in progress to prevent inconsistent CP data. > > I'd prefer to use f2fs_lock_op() in bigger coverage. Do you mean to cover the entire free_segment_range() function within f2fs_lock_op()? Please clarify. Thanks, > > > > > Signed-off-by: Sahitya Tummala > > --- > > fs/f2fs/gc.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c > > index 5bca560..6122bad 100644 > > --- a/fs/f2fs/gc.c > > +++ b/fs/f2fs/gc.c > > @@ -1399,8 +1399,10 @@ static int free_segment_range(struct f2fs_sb_info *sbi, unsigned int start, > > int err = 0; > > > > /* Move out cursegs from the target range */ > > + f2fs_lock_op(sbi); > > for (type = CURSEG_HOT_DATA; type < NR_CURSEG_TYPE; type++) > > allocate_segment_for_resize(sbi, type, start, end); > > + f2fs_unlock_op(sbi); > > > > /* do GC to move out valid blocks in the range */ > > for (segno = start; segno <= end; segno += sbi->segs_per_sec) { > > -- > > Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. > > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project. -- -- Sent by a consultant of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum. _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel