You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consider using libbtrfsutil in the btrfs plugin #552
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).
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.
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.
Activity
[-]Consider using libtrfsutil in the btrfs plugin[/-][+]Consider using libbtrfsutil in the btrfs plugin[/+]jelly commentedon Dec 4, 2023
One downside I noticed here is that libbtrsutil is not actually used by the
btrfsbinary, but it is used bysnapperit 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.
tbzatek commentedon Dec 5, 2023
Isn't it linked statically? Sometimes distros tend to link everything statically for initramfs use.
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.
jelly commentedon Dec 6, 2023
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.