[pve-devel] [PATCH storage 6/6] btrfs: note that btrfs_get_subvol_id() function is broken
Wolfgang Bumiller
w.bumiller at proxmox.com
Mon Mar 3 09:04:56 CET 2025
On Fri, Feb 28, 2025 at 03:50:22PM +0100, Fiona Ebner wrote:
> The btrfs_get_subvol_id() function is broken, because the btrfs
> 'subvol show' command is invoked with '-q', so there is no output.
>
> The function currently has no reachable caller.
>
> Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
> ---
> src/PVE/Storage/BTRFSPlugin.pm | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
> index db678cf..e20b36c 100644
> --- a/src/PVE/Storage/BTRFSPlugin.pm
> +++ b/src/PVE/Storage/BTRFSPlugin.pm
> @@ -232,6 +232,7 @@ sub btrfs_cmd {
> return $msg;
> }
>
> +# NOTE: this function is currently boken, because btrfs_cmd uses '-q' so there will be no output.
IMO we should instead comment out this function (and the now-unreachable
call to it in `volume_resize`, or more specifically, everything after
the new `die` in the affected if-branch).
This *is* easily fixed by removing the `-q` from the command - the logic
otherwise works AFAICT, but we don't need this code right now anyway.
> sub btrfs_get_subvol_id {
> my ($class, $path) = @_;
> my $info = $class->btrfs_cmd(['subvolume', 'show', '--', $path]);
> --
> 2.39.5
More information about the pve-devel
mailing list