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=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 A7038C388F3 for ; Mon, 30 Sep 2019 07:36:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7DE5221A4A for ; Mon, 30 Sep 2019 07:36:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729362AbfI3Hg0 (ORCPT ); Mon, 30 Sep 2019 03:36:26 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:3233 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725940AbfI3HgZ (ORCPT ); Mon, 30 Sep 2019 03:36:25 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id EC41A3B0846FBE479BC4; Mon, 30 Sep 2019 15:36:22 +0800 (CST) Received: from [10.134.22.195] (10.134.22.195) by smtp.huawei.com (10.3.19.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 30 Sep 2019 15:36:17 +0800 Subject: Re: [PATCH 4.19 53/63] f2fs: fix to do sanity check on segment bitmap of LFS curseg To: Pavel Machek , Greg Kroah-Hartman CC: , , Jaegeuk Kim , Sasha Levin References: <20190929135031.382429403@linuxfoundation.org> <20190929135040.450358370@linuxfoundation.org> <20190930072157.GB22914@atrey.karlin.mff.cuni.cz> From: Chao Yu Message-ID: <43edc2f2-5b42-0cd7-1573-af77fd9e6678@huawei.com> Date: Mon, 30 Sep 2019 15:36:16 +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: <20190930072157.GB22914@atrey.karlin.mff.cuni.cz> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On 2019/9/30 15:21, Pavel Machek wrote: > Hi! > > >> + for (blkofs += 1; blkofs < sbi->blocks_per_seg; blkofs++) { >> + if (!f2fs_test_bit(blkofs, se->cur_valid_map)) >> + continue; >> +out: >> + f2fs_msg(sbi->sb, KERN_ERR, >> + "Current segment's next free block offset is " >> + "inconsistent with bitmap, logtype:%u, " >> + "segno:%u, type:%u, next_blkoff:%u, blkofs:%u", >> + i, curseg->segno, curseg->alloc_type, >> + curseg->next_blkoff, blkofs); >> + return -EINVAL; >> + } > > So this is detecting filesystem corruption, right? Should it be > -EUCLEAN? Was fixed in another commit 10f966bbf521 ("f2fs: use generic EFSBADCRC/EFSCORRUPTED"). :) Thanks, > > Pavel >