Zfs fixes

This commit is contained in:
Ben Sarmiento
2023-11-12 02:05:45 +01:00
parent 2657eff11c
commit 0c2cff2387
14 changed files with 79 additions and 1155 deletions

View File

@@ -8,15 +8,13 @@ import (
"bazil.org/fuse/fs"
"github.com/debridmediamanager.com/zurg/internal/config"
"github.com/debridmediamanager.com/zurg/internal/torrent"
"github.com/debridmediamanager.com/zurg/pkg/chunk"
"github.com/debridmediamanager.com/zurg/pkg/logutil"
"golang.org/x/sys/unix"
)
func Mount(mountpoint string, cfg config.ConfigInterface, tMgr *torrent.TorrentManager, cMgr *chunk.Manager) error {
rlog := logutil.NewLogger()
log := rlog.Named("zfs")
func Mount(mountpoint string, cfg config.ConfigInterface, tMgr *torrent.TorrentManager) error {
log := logutil.NewLogger().Named("zfs")
options := []fuse.MountOption{
fuse.AllowOther(),
@@ -37,11 +35,10 @@ func Mount(mountpoint string, cfg config.ConfigInterface, tMgr *torrent.TorrentM
uid: uint32(unix.Geteuid()),
gid: uint32(unix.Getegid()),
umask: os.FileMode(0),
c: cfg,
t: tMgr,
config: cfg,
tMgr: tMgr,
log: log,
initTime: time.Now(),
chunk: cMgr,
}
if err := srv.Serve(filesys); err != nil {