From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH storage] zfs: sorted snapshot list: use -r parameter
Date: Mon, 10 Jan 2022 12:29:15 +0100 [thread overview]
Message-ID: <5b40cca8-efc3-05d8-f00c-df8000c4b268@proxmox.com> (raw)
In-Reply-To: <20220110093400.39218-1-f.ebner@proxmox.com>
I'll send a v2, which does the same for volume_snapshot_info().
Am 10.01.22 um 10:34 schrieb Fabian Ebner:
> Some versions of ZFS do not automatically display the child snapshots
> when '-t snapshot' is used, but require '-r' to be present
> additionally[1].
>
> Because of that, commit ac5c1af led to a regression[0] in the context
> of ZFS over iSCSI. Fix it, by adding a -r flag again.
>
> [0]: https://forum.proxmox.com/threads/102683/
> [1]: https://forum.proxmox.com/threads/102683/post-442577
>
> Fixes: ac5c1af ("zfspool: add zfs_get_sorted_snapshot_list helper")
> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
> ---
> PVE/Storage/ZFSPoolPlugin.pm | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/PVE/Storage/ZFSPoolPlugin.pm b/PVE/Storage/ZFSPoolPlugin.pm
> index 5f6befd..25cfdf3 100644
> --- a/PVE/Storage/ZFSPoolPlugin.pm
> +++ b/PVE/Storage/ZFSPoolPlugin.pm
> @@ -398,9 +398,11 @@ sub zfs_list_zvol {
> sub zfs_get_sorted_snapshot_list {
> my ($class, $scfg, $volname, $sort_params) = @_;
>
> + my @params = ('-H', '-r', '-t', 'snapshot', '-o', 'name', $sort_params->@*);
> +
> my $vname = ($class->parse_volname($volname))[1];
> + push @params, "$scfg->{pool}\/$vname";
>
> - my @params = ('-H', '-t', 'snapshot', '-o', 'name', $sort_params->@*, "$scfg->{pool}\/$vname");
> my $text = $class->zfs_request($scfg, undef, 'list', @params);
> my @snapshots = split(/\n/, $text);
>
prev parent reply other threads:[~2022-01-10 11:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-10 9:34 Fabian Ebner
2022-01-10 11:29 ` Fabian Ebner [this message]
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=5b40cca8-efc3-05d8-f00c-df8000c4b268@proxmox.com \
--to=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.