my $name = $ENV{ZSLICE};
$name =~ s/\W+/_/g;
-$worker->register_function( $name . '_quota_get' => sub { zfs(
-"zfs get -H -p -o value userused\@u%s $ENV{ZSLICE}" => $_[0]
-) } );
+$worker->register_function( $name . '_quota_get' => sub {
+ my $used = zfs( "zfs get -H -p -o value userused\@u%s $ENV{ZSLICE}" => $_[0] );
+ my $quota = zfs( "zfs get -H -p -o value userquota\@u%s $ENV{ZSLICE}" => $_[0] );
+ return "$used $quota";
+} );
$worker->register_function( $name . '_quota_set' => sub { zfs(
"zfs set userquota\@u%s=%s $ENV{ZSLICE}" => $_[0]