Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion pkg/storage/fs/posix/posix.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ func init() {
type posixFS struct {
storage.FS

um usermapper.Mapper
tree *tree.Tree
um usermapper.Mapper
}

// New returns an implementation to of the storage.FS interface that talk to
Expand Down Expand Up @@ -215,11 +216,17 @@ func New(o *options.Options, stream events.Stream, cache, historyCache *idcache.

mw := middleware.NewFS(dfs, hooks...)
fs.FS = mw
fs.tree = tp
fs.um = um

return fs, nil
}

// WarmupIDCache allows triggering a posix fs scan and id cache warmup manually.
func (fs *posixFS) WarmupIDCache(root string, assimilate, onlyDirty bool) error {
return fs.tree.WarmupIDCache(root, assimilate, onlyDirty)
}

// ListUploadSessions returns the upload sessions matching the given filter
func (fs *posixFS) ListUploadSessions(ctx context.Context, filter storage.UploadSessionFilter) ([]storage.UploadSession, error) {
return fs.FS.(storage.UploadSessionLister).ListUploadSessions(ctx, filter)
Expand Down