mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2026-02-02 15:45:13 +01:00
chore(refactor): move xfs and mount code out of zfs package
Signed-off-by: Pawan <pawan@mayadata.io>
This commit is contained in:
parent
935a544538
commit
d537bd3655
5 changed files with 86 additions and 59 deletions
|
|
@ -24,6 +24,7 @@ import (
|
|||
|
||||
apis "github.com/openebs/zfs-localpv/pkg/apis/openebs.io/zfs/v1"
|
||||
"github.com/openebs/zfs-localpv/pkg/btrfs"
|
||||
"github.com/openebs/zfs-localpv/pkg/xfs"
|
||||
k8serrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/klog"
|
||||
"strings"
|
||||
|
|
@ -440,7 +441,8 @@ func CreateClone(vol *apis.ZFSVolume) error {
|
|||
}
|
||||
|
||||
if vol.Spec.FsType == "xfs" {
|
||||
return xfsGenerateUUID(volume)
|
||||
device := ZFSDevPath + volume
|
||||
return xfs.GenerateUUID(device)
|
||||
}
|
||||
if vol.Spec.FsType == "btrfs" {
|
||||
device := ZFSDevPath + volume
|
||||
|
|
@ -814,7 +816,8 @@ func CreateRestore(rstr *apis.ZFSRestore) error {
|
|||
* so that we can mount it.
|
||||
*/
|
||||
if vol.Spec.FsType == "xfs" {
|
||||
return xfsGenerateUUID(volume)
|
||||
device := ZFSDevPath + volume
|
||||
return xfs.GenerateUUID(device)
|
||||
}
|
||||
if vol.Spec.FsType == "btrfs" {
|
||||
device := ZFSDevPath + volume
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue