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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 05033C2D0A8 for ; Wed, 23 Sep 2020 19:41:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B0E5820888 for ; Wed, 23 Sep 2020 19:41:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726466AbgIWTlx convert rfc822-to-8bit (ORCPT ); Wed, 23 Sep 2020 15:41:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726156AbgIWTlw (ORCPT ); Wed, 23 Sep 2020 15:41:52 -0400 Received: from mail.lichtvoll.de (lichtvoll.de [IPv6:2001:67c:14c:12f::11:100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 807FEC0613CE for ; Wed, 23 Sep 2020 12:41:52 -0700 (PDT) Received: from 127.0.0.1 (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.lichtvoll.de (Postfix) with ESMTPSA id 6CD2B1566E1; Wed, 23 Sep 2020 21:41:50 +0200 (CEST) From: Martin Steigerwald To: linux-btrfs@vger.kernel.org, Qu Wenruo , Qu Wenruo Subject: Re: [PATCH] btrfs: fix false alert caused by legacy btrfs root item Date: Wed, 23 Sep 2020 21:41:48 +0200 Message-ID: <1952994.EpAzVLkqvi@merkaba> In-Reply-To: References: <20200922023701.32654-1-wqu@suse.com> <8998433.IpVEtotQbC@merkaba> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="UTF-8" Authentication-Results: mail.lichtvoll.de; auth=pass smtp.auth=martin smtp.mailfrom=martin@lichtvoll.de Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Qu Wenruo - 23.09.20, 01:17:01 CEST: > On 2020/9/22 下午11:48, Martin Steigerwald wrote: > > Qu Wenruo - 22.09.20, 12:34:18 CEST: > >> On 2020/9/22 下午6:20, Martin Steigerwald wrote: > >>> Instead of the tool, can I also patch my kernel with the patch > >>> below > >>> to have it automatically fix it? > >> > >> Sure, this one is a little safer than the tool. […] > >>> If so, which approach would you prefer for testing? > >>> I can apply the patch as I compile kernels myself. > >> > >> That's great. > >> > >> That should solve the problem. > >> > >> And if you don't like the legacy root item, just do a balance (no > >> matter data or metadata), and that legacy root item will be > >> converted to current one, and even affected kernel won't report > >> any error any more. > > > > Can I get away with a minimal balance? Or does it need to be a full > > one? > Minimal is enough. > You just need to balance one chunk. > > You can confirm it with "btrfs ins dump-tree -t root ". > If DATA_RELOC_TREE item size is still 249, it's legacy one. > If it's 429, then it's the current one. Hmmm its 439. So is that good as well? item 178 key (DATA_RELOC_TREE ROOT_ITEM 0) itemoff 8546 itemsize 439 generation 13246 root_dirid 256 bytenr 896876544 level 0 refs 1 lastsnap 0 byte_limit 0 bytes_used 16384 flags 0x0(none) uuid […] drop key (0 UNKNOWN.0 0) level 0 What is this tree used for by the way? If you like I can test with unpatched kernel whether warning goes away, but I bet it may not be needed. […] -- Martin