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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 945E9C07E96 for ; Tue, 6 Jul 2021 13:04:42 +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 2AB0861C40 for ; Tue, 6 Jul 2021 13:04:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2AB0861C40 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com 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 1m0kki-0005ZD-GW; Tue, 06 Jul 2021 13:04:40 +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 1m0kkh-0005Z6-0b for linux-f2fs-devel@lists.sourceforge.net; Tue, 06 Jul 2021 13:04:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: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=CoHnf1IcngU1WGn40+WFyK7nicwHKZy2mB7zPzbPhb4=; b=JdIAY7kLFPlQXvSHIkqCTHCvBS f4gUH4Pytj23jdPZ6giqmpCSEzRlQptO4ZSk1DBP0bCbGF+njm/GEA2GfURusEZI6w0CLz1RCGd6q BXgfOGtvLpiTDC1RA4juERKqN/84gd68/22L7+ALTimoZB8mSOz21xikwlc9SqYyd0lA=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Date: Subject:CC:To:From:Sender:Reply-To: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=CoHnf1IcngU1WGn40+WFyK7nicwHKZy2mB7zPzbPhb4=; b=a HYXlx8qMHlKpUy708uvKnbRLA/y2mv8nvEnmbmM6TLsBYhYgIW57lOMGA3/eNaDiov5qGBv65RAzn YYDxwgAHiza8k8Ot/y16vrFK9hKO1jmy3EZRr1/gEBIfP05c7aPbkedyNhNgRV44+9KxzliPdQ63C kvuFBbl10Q+ZvzXg=; Received: from szxga08-in.huawei.com ([45.249.212.255]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) id 1m0kkZ-0007xo-CC for linux-f2fs-devel@lists.sourceforge.net; Tue, 06 Jul 2021 13:04:38 +0000 Received: from dggeml756-chm.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4GK2g804f3z1CG0m; Tue, 6 Jul 2021 20:58:44 +0800 (CST) Received: from huawei.com (10.175.101.6) by dggeml756-chm.china.huawei.com (10.1.199.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Tue, 6 Jul 2021 21:04:11 +0800 From: Wang Xiaojun To: , Date: Tue, 6 Jul 2021 21:10:08 +0800 Message-ID: <20210706131008.1299060-1-wangxiaojun11@huawei.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 X-Originating-IP: [10.175.101.6] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggeml756-chm.china.huawei.com (10.1.199.158) X-CFilter-Loop: Reflected X-Headers-End: 1m0kkZ-0007xo-CC Subject: [f2fs-dev] [PATCH] f2fs-tools: fix wrong value of reserve_new_block parameter in page_symlink 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-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 In page_symlink, reserve_new_block applies address for data block, not for inodes. Therefore, is_inode is set to 0. Signed-off-by: Wang Xiaojun --- fsck/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsck/dir.c b/fsck/dir.c index aeb876d..f7491a7 100644 --- a/fsck/dir.c +++ b/fsck/dir.c @@ -400,7 +400,7 @@ static void page_symlink(struct f2fs_sb_info *sbi, struct f2fs_node *inode, memcpy(data_blk, symname, symlen); set_summary(&sum, ino, 0, ni.version); - ret = reserve_new_block(sbi, &blkaddr, &sum, CURSEG_WARM_DATA, 1); + ret = reserve_new_block(sbi, &blkaddr, &sum, CURSEG_WARM_DATA, 0); ASSERT(!ret); ret = dev_write_block(data_blk, blkaddr); -- 2.25.4 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel