From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:24819 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752147AbcD1OOC (ORCPT ); Thu, 28 Apr 2016 10:14:02 -0400 Subject: Re: [PATCH RFC 03/16] btrfs-progs: fsck: Introduce function to query tree block level To: Qu Wenruo , References: <1461642543-4621-1-git-send-email-quwenruo@cn.fujitsu.com> <1461642543-4621-4-git-send-email-quwenruo@cn.fujitsu.com> CC: , Lu Fengqi From: Josef Bacik Message-ID: Date: Thu, 28 Apr 2016 10:13:45 -0400 MIME-Version: 1.0 In-Reply-To: <1461642543-4621-4-git-send-email-quwenruo@cn.fujitsu.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Sender: linux-btrfs-owner@vger.kernel.org List-ID: On 04/25/2016 11:48 PM, Qu Wenruo wrote: > From: Lu Fengqi > > Introduce function query_tree_block_level() to resolve tree block level > by reading out the tree block. > > Signed-off-by: Lu Fengqi > Signed-off-by: Qu Wenruo > --- This skips the check_tree_block if the transid passes, but we could have a matching transid but a corrupt item. You need to fix read_tree_block_fs_info to always call check_block so we can be sure that our btrfs_header_level() is valid here. Thanks, Josef