[PATCH] btrfs: Use default subvolume as filesystem root
Tom Rini
trini at konsulko.com
Wed Sep 1 16:12:31 CEST 2021
On Sun, Aug 01, 2021 at 11:52:16PM +0300, 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).
>
> 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 <matwey.kornilov at gmail.com>
> Reviewed-by: Qu Wenruo <wqu at suse.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210901/526d004d/attachment.sig>
More information about the U-Boot
mailing list