Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Consider using libbtrfsutil in the btrfs plugin #552

Open

Description

@vojtechtrefny

libbtrfsutil was added in 2018 (btrfs-progs 4.16), we should consider using it in the btrfs plugin instead of calling btrfs tools and parsing their output. It looks like it supports everything we need (but we should take a closer look first to be 100 % sure).

Activity

  1. changed the title [-]Consider using libtrfsutil in the btrfs plugin[/-] [+]Consider using libbtrfsutil in the btrfs plugin[/+] on Jul 23, 2020
  2. jelly commented on Dec 4, 2023

    @jelly
    Contributor

    One downside I noticed here is that libbtrsutil is not actually used by the btrfs binary, but it is used by snapper it probably doesn't break a lot but worth to check if it has unit tests.

    If libblockdev wants to extend btrfs information, then libbrtfsutil needs to be extended.

  3. tbzatek commented on Dec 5, 2023

    @tbzatek
    Member

    libbtrsutil is not actually used by the btrfs binary

    Isn't it linked statically? Sometimes distros tend to link everything statically for initramfs use.

    If libblockdev wants to extend btrfs information, then libbrtfsutil needs to be extended.

    Theoretically we may opt for a mixed use - library calls for most of the stuff and external tools as a fallback for missing functionality. Assuming both the library and the tools are part of a single package.

  4. jelly commented on Dec 6, 2023

    @jelly
    Contributor

    I think I might have looked at it wrong, this struct is indeed re-used in the cli interface https://github.com/search?q=repo%3Akdave%2Fbtrfs-progs+btrfs_util_subvolume&type=code

    And FYI there is a list of things which are required for snapper and implemented in libbtrfsutil.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions