From: Niclas Berglind Date: Tue, 4 Mar 2014 20:28:08 +0000 (+0100) Subject: Added upgrade method to Dataset class X-Git-Url: http://git.datanom.net/omvzfs.git/commitdiff_plain/dcac32d694ef793228343acae23828a1571df2d6 Added upgrade method to Dataset class Signed-off-by: Niclas Berglind --- 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).