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=-9.6 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,USER_AGENT_GIT 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 F0DC9C2D0E8 for ; Thu, 26 Mar 2020 10:39:10 +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 BDFF420748; Thu, 26 Mar 2020 10:39:09 +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="Vd428ria"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="hruSy24M"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="DSDwlGVo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BDFF420748 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-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1jHPul-0002k1-Js; Thu, 26 Mar 2020 10:39:07 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jHPuk-0002jV-9s for linux-f2fs-devel@lists.sourceforge.net; Thu, 26 Mar 2020 10:39:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZvQ1jdFwqw7szV2N4aXKvGSeJpZKMjp8kiQ4LNqos/M=; b=Vd428riaAM8ezaR36fN0Kwrwd3 r2DaNel8oJoWFOBly5pAxofRAf47pXwLyTRGljgZ0tK5ISJXY21htwQzn6CXk2wME6VTMeaOZswHq HN+PFecVB/mDUJnDzhn8rHc5hOCmiCGFVl4gF/N58M4t6AjNkJ6LwTshmsM3GKUMhuvE=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version: Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ZvQ1jdFwqw7szV2N4aXKvGSeJpZKMjp8kiQ4LNqos/M=; b=hruSy24MX2OUHoPeecDtQYRpeR 3AQrK8rHnTSVGJi5lHosFTiF267WP5iQ96uSutbd08X7RSs9gdasbmARBRTCfguPFTTB/5VDw3dV0 BBICYifoei19fT2OebXJS/g7EDjSMXer7JjuboOm3dwI52wgdg1XXcTkSyqfF+YB4lR0=; Received: from mail26.static.mailgun.info ([104.130.122.26]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1jHPuf-004L57-JN for linux-f2fs-devel@lists.sourceforge.net; Thu, 26 Mar 2020 10:39:06 +0000 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1585219143; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=ZvQ1jdFwqw7szV2N4aXKvGSeJpZKMjp8kiQ4LNqos/M=; b=DSDwlGVo7atAdiI3bQGFaL6IoHhHG7OpOnNHK6mh5JptLdnK6OLjTgN5GudMaEYUeAYMyqEj 5voe811y9antWwlroFmzG6/jnVXxE4wUeNycMT9DBvGBn4NciNQsM8GT5p12adKn98NsA8E6 jmDcb6wMDeZhX0UDVvICeeMQvHY= 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 5e7c8634.7f5fc43eba08-smtp-out-n02; Thu, 26 Mar 2020 10:38:44 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 5D7E9C433F2; Thu, 26 Mar 2020 10:38:43 +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 ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: stummala) by smtp.codeaurora.org (Postfix) with ESMTPSA id F2808C433D2; Thu, 26 Mar 2020 10:38:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org F2808C433D2 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 From: Sahitya Tummala To: Jaegeuk Kim , Chao Yu , linux-f2fs-devel@lists.sourceforge.net Date: Thu, 26 Mar 2020 16:06:59 +0530 Message-Id: <1585219019-24831-1-git-send-email-stummala@codeaurora.org> X-Mailer: git-send-email 1.9.1 X-Headers-End: 1jHPuf-004L57-JN Subject: [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 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net 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. 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. _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel