public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH storage v3 2/2] BTRFSPlugin: reuse DirPlugin update/get_volume_attribute
Date: Thu,  2 Jun 2022 10:52:14 +0200	[thread overview]
Message-ID: <20220602085214.1449718-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20220602085214.1449718-1-d.csapak@proxmox.com>

this allows setting notes+protected for backups on btrfs

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
changes from v2:
* parameter style fix
* added Acked-by

 PVE/Storage/BTRFSPlugin.pm | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/PVE/Storage/BTRFSPlugin.pm b/PVE/Storage/BTRFSPlugin.pm
index be613f4..1db4e4f 100644
--- a/PVE/Storage/BTRFSPlugin.pm
+++ b/PVE/Storage/BTRFSPlugin.pm
@@ -138,9 +138,22 @@ sub status {
     return PVE::Storage::DirPlugin::status($class, $storeid, $scfg, $cache);
 }
 
-# TODO: sub get_volume_attribute {}
+sub get_volume_attribute {
+    my ($class, $scfg, $storeid, $volname, $attribute) = @_;
+    return PVE::Storage::DirPlugin::get_volume_attribute($class, $scfg, $storeid, $volname, $attribute);
+}
 
-# TODO: sub update_volume_attribute {}
+sub update_volume_attribute {
+    my ($class, $scfg, $storeid, $volname, $attribute, $value) = @_;
+    return PVE::Storage::DirPlugin::update_volume_attribute(
+	$class,
+	$scfg,
+	$storeid,
+	$volname,
+	$attribute,
+	$value,
+    );
+}
 
 # croak would not include the caller from within this module
 sub __error {
-- 
2.30.2





  reply	other threads:[~2022-06-02  8:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-02  8:52 [pve-devel] [PATCH storage v3 1/2] DirPlugin: update_volume_attribute: don't use update_volume_notes Dominik Csapak
2022-06-02  8:52 ` Dominik Csapak [this message]
2022-07-01 12:12 ` Dominik Csapak
2022-07-05  9:35 ` [pve-devel] applied-series: " Wolfgang Bumiller

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=20220602085214.1449718-2-d.csapak@proxmox.com \
    --to=d.csapak@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