From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Fiona Ebner <f.ebner@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH storage 5/6] btrfs: die early for broken subvolume resize
Date: Mon, 3 Mar 2025 09:02:46 +0100 [thread overview]
Message-ID: <cm6ncackga7lolikddi3qnsj7cfaxf5mwc6ppoh36xhaqph7xx@t2fnvnn2naag> (raw)
In-Reply-To: <20250228145022.73966-6-f.ebner@proxmox.com>
On Fri, Feb 28, 2025 at 03:50:21PM +0100, Fiona Ebner wrote:
> In the BTRFS plugin, resize_volume() for a subovlume currently fails
> with "failed to get btrfs subvolume ID from: ". This is because the
> btrfs 'subvol show' command is invoked with '-q', so there is no
> output.
Curious. This must have changed in the btrfs CLI at some point. But yes,
bailing out here makes more sense with the code for the initial limit
being commented out...
(They also haven't yet implemented `--format json` for the command… -_-)
>
> As btrfs quotas are currently not implemented, die early with a clean
> error instead.
>
> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
> ---
> src/PVE/Storage/BTRFSPlugin.pm | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
> index b1f7912..db678cf 100644
> --- a/src/PVE/Storage/BTRFSPlugin.pm
> +++ b/src/PVE/Storage/BTRFSPlugin.pm
> @@ -497,6 +497,9 @@ sub volume_resize {
>
> my $format = ($class->parse_volname($volname))[6];
> if ($format eq 'subvol') {
> + # NOTE: `btrfs send/recv` actually drops quota information so supporting subvolumes with
> + # quotas doesn't play nice with send/recv.
> + die "cannot resize subvolume - btrfs quotas are currently not supported\n";
> my $path = $class->filesystem_path($scfg, $volname);
> my $id = '0/' . $class->btrfs_get_subvol_id($path);
> $class->btrfs_cmd(['qgroup', 'limit', '--', "${size}k", "0/$id", $path]);
> --
> 2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-03-03 8:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-28 14:50 [pve-devel] [PATCH-SERIES storage 0/6] unsized subvol regression fix and improvements Fiona Ebner
2025-02-28 14:50 ` [pve-devel] [PATCH storage 1/6] plugin: file size info: be consistent about size of directory subvol Fiona Ebner
2025-02-28 14:50 ` [pve-devel] [PATCH storage 2/6] btrfs: fix volume size info for subvolumes in scalar context Fiona Ebner
2025-03-03 7:31 ` Wolfgang Bumiller
2025-03-03 9:03 ` Fiona Ebner
2025-03-03 9:10 ` Fiona Ebner
2025-02-28 14:50 ` [pve-devel] [PATCH storage 3/6] plugin: volume export formats: avoid superfluous file_size_info() call Fiona Ebner
2025-02-28 14:50 ` [pve-devel] [PATCH storage 4/6] api: volume info: do not fail for zero-sized subvolumes Fiona Ebner
2025-02-28 14:50 ` [pve-devel] [PATCH storage 5/6] btrfs: die early for broken subvolume resize Fiona Ebner
2025-03-03 8:02 ` Wolfgang Bumiller [this message]
2025-02-28 14:50 ` [pve-devel] [PATCH storage 6/6] btrfs: note that btrfs_get_subvol_id() function is broken Fiona Ebner
2025-03-03 8:04 ` Wolfgang Bumiller
2025-03-03 9:25 ` [pve-devel] [PATCH-SERIES storage 0/6] unsized subvol regression fix and improvements Fiona Ebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cm6ncackga7lolikddi3qnsj7cfaxf5mwc6ppoh36xhaqph7xx@t2fnvnn2naag \
--to=w.bumiller@proxmox.com \
--cc=f.ebner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal