From dcac32d694ef793228343acae23828a1571df2d6 Mon Sep 17 00:00:00 2001 From: Niclas Berglind Date: Tue, 4 Mar 2014 21:28:08 +0100 Subject: [PATCH] Added upgrade method to Dataset class Signed-off-by: Niclas Berglind --- src/Dataset.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Dataset.php b/src/Dataset.php index db3a165..d6796e5 100644 --- a/src/Dataset.php +++ b/src/Dataset.php @@ -18,7 +18,8 @@ class OMVModuleZFSDataset { * @access private */ private $name; - /** + + /** * Mountpoint of the Dataset * * @var string $mountPoint @@ -179,6 +180,17 @@ class OMVModuleZFSDataset { $this->updateProperty($property); } + /** + * Upgrades the Dataset to latest filesystem version + * + * @return void + * @access public + */ + public function upgrade() { + $cmd = "zfs upgrade " . $this->name . " 2>&1"; + $this->exec($cmd,$out,$res); + } + /** * Helper function to execute a command and throw an exception on error * (requires stderr redirected to stdout for proper exception message). -- 2.39.2