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=-10.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 06FA9C432BE for ; Wed, 1 Sep 2021 13:48:36 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 331FC6101A for ; Wed, 1 Sep 2021 13:48:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 331FC6101A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EF2DB834F9; Wed, 1 Sep 2021 15:48:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="avrR4K0i"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E9AE883519; Wed, 1 Sep 2021 15:48:29 +0200 (CEST) Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0598D8350B for ; Wed, 1 Sep 2021 15:48:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=matthias.bgg@gmail.com Received: by mail-wm1-x336.google.com with SMTP id u15so1946771wmj.1 for ; Wed, 01 Sep 2021 06:48:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=AQJgvK75TzoHk16jLBNIA7PMW4851sIjo85BEKtKV/8=; b=avrR4K0ijdRY76TRK7bnNhXEF65rTNpMIM4EpNUSaUVWgj6n9SrOZbxSgpxtQ7SiRW RhQLM2/emYao/ZqHpRgDACH+NRVaPr6ywnUG4cQrpT0UinSyQLuflAXXKhjTBIXWehzv jJENKDusAMcjw6G+xapP+Q2tIrf30+omuKXbrXcWPnxOtgxsqVSos6TKZnoqW5Gqa+Qw Yz/TjtFFGmreUTtC1qFPbZnNXJiRd+4yqwyooHWoTH6Dp23DUVKi246UFHAwlpOPPf+F bPdPiFZc6/wKN7qPdtV5FBIllFJhXupuKikiRO3lvOuqaJh1strtHR3Ce1+bALNA6YUN dqXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=AQJgvK75TzoHk16jLBNIA7PMW4851sIjo85BEKtKV/8=; b=S3g0LwU5+2BoKwt4exvqfA6a1a0FbHM6sot2JcJnCBoWO3//EfD2mWoacgvbSq3el7 KEHA2HCPjKuNr4DFVnZLWSUCMmxKX9K+w9Bkdd3iZ/f6w/8t2xFQ3QEwfMfdnjkmG32M MqOukqLJCnDbmp2C7I0hhZHJrGUHhcnBUH87gD4I5Xk/t8+ntpJFzCbVPSA4Dq8gFbqm yTE2M1mGTI+ceOwVOVJh1hZhYyHANrGVyjWT7mLAzWiLEp+IJ87MDIRPk3GX7y09LlBq r5W5EFCUG1FZtnsbQU6WVY0n1bYo94OmeNeIqNzWVNELMt+/oj5eQix1O8upQxXWyRaf Ev8Q== X-Gm-Message-State: AOAM533MB90Ai+UVrttLzrwJ4P9qEQz+QF/fLZK0PZsqv/dRFmLS5Ogj 97blP6GPOnEWkmI9IiBWbNHT79wyDdc= X-Google-Smtp-Source: ABdhPJwU5HzrZjIV45YIDA4ZL4rD/RfkvNgEBIzRDgNgz5VR5D2gZkIcj3HN23f74W3e/IQ5wVnXoQ== X-Received: by 2002:a05:600c:1c91:: with SMTP id k17mr8865566wms.84.1630504088439; Wed, 01 Sep 2021 06:48:08 -0700 (PDT) Received: from ziggy.stardust ([37.223.140.66]) by smtp.gmail.com with ESMTPSA id b12sm24953342wrx.72.2021.09.01.06.48.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Sep 2021 06:48:07 -0700 (PDT) Subject: Re: [PATCH] btrfs: Use default subvolume as filesystem root To: Tom Rini Cc: Qu Wenruo , "Matwey V. Kornilov" , marek.behun@nic.cz, u-boot@lists.denx.de References: <20210801205216.22639-1-matwey.kornilov@gmail.com> <474eac73-5765-5bfe-acf0-03510f1ad04f@suse.com> <94e2a6c0-3aa6-9b4c-0459-07a7db14ee95@gmail.com> <20210901113659.GX858@bill-the-cat> From: Matthias Brugger Message-ID: Date: Wed, 1 Sep 2021 15:48:07 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210901113659.GX858@bill-the-cat> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On 01/09/2021 13:36, Tom Rini wrote: > On Wed, Sep 01, 2021 at 01:28:30PM +0200, Matthias Brugger wrote: >> Hi Tom, >> >> On 02/08/2021 01:06, Qu Wenruo wrote: >>> >>> >>> On 2021/8/2 上午4:52, Matwey V. Kornilov wrote: >>>> BTRFS volume consists of a number of subvolumes which can be mounted separately >>>> from each other. The top-level subvolume always exists even if no subvolumes >>>> were created manually. A subvolume can be denoted as the default subvolume i.e. >>>> the subvolume which is mounted by default. >>>> >>>> The default "default subvolume" is the top-level one, but this is far from the >>>> common practices used in the wild. For instance, openSUSE provides an OS >>>> snapshot/rollback feature based on BTRFS. To achieve this, the actual OS root >>>> filesystem is located into a separate subvolume which is "default" but not >>>> "top-level". That means that the /boot/dtb/ directory is also located inside >>>> this default subvolume instead of top-level one. >>>> >>>> However, the existing btrfs u-boot driver always uses the top-level subvolume >>>> as the filesystem root. This behaviour 1) is inconsistent with >>>> >>>>      mount /dev/sda1 /target >>>> >>>> command, which mount the default subvolume 2) leads to the issues when >>>> /boot/dtb cannot be found properly (see the reference). >>> >>> I also noticed the problem in the past, but forgot to fix it.... >>> >>>> >>>> This patch uses the default subvolume as the filesystem root to overcome >>>> mentioned issues. >>>> >>>> Reference: https://bugzilla.suse.com/show_bug.cgi?id=1185656 >>>> Signed-off-by: Matwey V. Kornilov >>> >>> Reviewed-by: Qu Wenruo >>> >> >> I can see that this patch is marked in your patchwork queue as "Need Review / >> ACK". Qu is one of our core btrfs developer who reviewed the patch. Apart from >> that we have it running on openSUSE on top of v2021.07 for some time without any >> issues. > > Ah, yup. Qu is one of the people I do look for to have reviewed a btrfs > patch before I apply it (and I throw things under Need Review / ACK as a > note-to-self to make sure a patch does have one, when I can expect one, > before applying, FWIW). > >> Would it be possible to merge this for v2021.10 or do you see any blocker here? > > I think I had mentally filed it was feature not bugfix and was going to > hold off, but since you're asking, yes, I can grab it for this release. > Thanks! > It's a bugfix, as loading files from BTRFS, at least in openSUSE does not work without it. Thanks for the quick answer! Matthias