From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH storage 2/2] rbd: merge rbd_cmd and build_cmd helpers
Date: Tue, 22 Apr 2025 10:56:16 +0200 [thread overview]
Message-ID: <20250422085616.212775-2-f.gruenbichler@proxmox.com> (raw)
In-Reply-To: <20250422085616.212775-1-f.gruenbichler@proxmox.com>
since the former was just a wrapper around the latter, and the only call
site..
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
src/PVE/Storage/RBDPlugin.pm | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/src/PVE/Storage/RBDPlugin.pm b/src/PVE/Storage/RBDPlugin.pm
index 162c016..73bc97e 100644
--- a/src/PVE/Storage/RBDPlugin.pm
+++ b/src/PVE/Storage/RBDPlugin.pm
@@ -84,14 +84,13 @@ my sub get_rbd_dev_path {
return $pve_path;
}
-my $build_cmd = sub {
- my ($binary, $scfg, $storeid, $op, @options) = @_;
+my $rbd_cmd = sub {
+ my ($scfg, $storeid, $op, @options) = @_;
my $cmd_option = PVE::CephConfig::ceph_connect_option($scfg, $storeid);
my $pool = $scfg->{pool} ? $scfg->{pool} : 'rbd';
-
- my $cmd = [$binary];
+ my $cmd = ['/usr/bin/rbd'];
if ($op eq 'import') {
push $cmd->@*, '--dest-pool', $pool;
} else {
@@ -118,12 +117,6 @@ my $build_cmd = sub {
return $cmd;
};
-my $rbd_cmd = sub {
- my ($scfg, $storeid, $op, @options) = @_;
-
- return $build_cmd->('/usr/bin/rbd', $scfg, $storeid, $op, @options);
-};
-
# needed for volumes created using ceph jewel (or higher)
my $krbd_feature_update = sub {
my ($scfg, $storeid, $name) = @_;
--
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-04-22 8:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-22 8:56 [pve-devel] [PATCH storage 1/2] rbd: remove no longer used rados_cmd helper Fabian Grünbichler
2025-04-22 8:56 ` Fabian Grünbichler [this message]
2025-04-22 10:20 ` Aaron Lauterer
2025-04-22 10:48 ` [pve-devel] applied-series: " Fabian Grünbichler
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=20250422085616.212775-2-f.gruenbichler@proxmox.com \
--to=f.gruenbichler@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