The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6703

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From 122343725742ffe2d17b26f49a7043a44757c560 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Mon, 13 Jan 2020 17:15:03 -0500
Subject: [PATCH] lxd/storage/zfs: Fix set on 0.6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
---
 lxd/storage/drivers/driver_zfs_utils.go | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lxd/storage/drivers/driver_zfs_utils.go 
b/lxd/storage/drivers/driver_zfs_utils.go
index 5fb81cd2a5..f0c1624a56 100644
--- a/lxd/storage/drivers/driver_zfs_utils.go
+++ b/lxd/storage/drivers/driver_zfs_utils.go
@@ -123,6 +123,18 @@ func (d *zfs) getDatasets(dataset string) ([]string, 
error) {
 }
 
 func (d *zfs) setDatasetProperties(dataset string, options ...string) error {
+       if len(zfsVersion) >= 3 && zfsVersion[0:3] == "0.6" {
+               // Slow path for ZFS 0.6
+               for _, option := range options {
+                       _, err := shared.RunCommand("zfs", "set", option, 
dataset)
+                       if err != nil {
+                               return err
+                       }
+               }
+
+               return nil
+       }
+
        args := []string{"set"}
        args = append(args, options...)
        args = append(args, dataset)
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to