union: fix eplus policy to select correct entry for existing files #6071
This commit is contained in:
parent
1e1af46a12
commit
29e37749b3
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ func (p *EpLus) lusEntries(entries []upstream.Entry) (upstream.Entry, error) {
|
||||||
var minUsedSpace int64 = math.MaxInt64
|
var minUsedSpace int64 = math.MaxInt64
|
||||||
var lusEntry upstream.Entry
|
var lusEntry upstream.Entry
|
||||||
for _, e := range entries {
|
for _, e := range entries {
|
||||||
space, err := e.UpstreamFs().GetFreeSpace()
|
space, err := e.UpstreamFs().GetUsedSpace()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fs.LogPrintf(fs.LogLevelNotice, nil,
|
fs.LogPrintf(fs.LogLevelNotice, nil,
|
||||||
"Used Space is not supported for upstream %s, treating as 0", e.UpstreamFs().Name())
|
"Used Space is not supported for upstream %s, treating as 0", e.UpstreamFs().Name())
|
||||||
|
|
Loading…
Reference in a new issue