mirror of
https://github.com/restic/restic.git
synced 2025-10-09 19:10:25 +00:00
Remove blob size cache from restic mount
This commit is contained in:
@@ -9,8 +9,6 @@ import (
|
||||
"github.com/restic/restic/internal/debug"
|
||||
"github.com/restic/restic/internal/restic"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
|
||||
"bazil.org/fuse/fs"
|
||||
)
|
||||
|
||||
@@ -25,12 +23,11 @@ type Config struct {
|
||||
|
||||
// Root is the root node of the fuse mount of a repository.
|
||||
type Root struct {
|
||||
repo restic.Repository
|
||||
cfg Config
|
||||
inode uint64
|
||||
snapshots restic.Snapshots
|
||||
blobCache *blobCache
|
||||
blobSizeCache *BlobSizeCache
|
||||
repo restic.Repository
|
||||
cfg Config
|
||||
inode uint64
|
||||
snapshots restic.Snapshots
|
||||
blobCache *blobCache
|
||||
|
||||
snCount int
|
||||
lastCheck time.Time
|
||||
@@ -50,15 +47,14 @@ const rootInode = 1
|
||||
const blobCacheSize = 64 << 20
|
||||
|
||||
// NewRoot initializes a new root node from a repository.
|
||||
func NewRoot(ctx context.Context, repo restic.Repository, cfg Config) *Root {
|
||||
func NewRoot(repo restic.Repository, cfg Config) *Root {
|
||||
debug.Log("NewRoot(), config %v", cfg)
|
||||
|
||||
root := &Root{
|
||||
repo: repo,
|
||||
inode: rootInode,
|
||||
cfg: cfg,
|
||||
blobCache: newBlobCache(blobCacheSize),
|
||||
blobSizeCache: NewBlobSizeCache(ctx, repo.Index()),
|
||||
repo: repo,
|
||||
inode: rootInode,
|
||||
cfg: cfg,
|
||||
blobCache: newBlobCache(blobCacheSize),
|
||||
}
|
||||
|
||||
if !cfg.OwnerIsRoot {
|
||||
|
Reference in New Issue
Block a user