From c6e8225a2090acce1e97ff110c5b4999e1d1c408 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 12 Nov 2019 21:05:48 -0800 Subject: [PATCH] adjust memory mapped file size related to https://github.com/chrislusf/seaweedfs/pull/1087 --- weed/storage/backend/memory_map/memory_map_backend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/storage/backend/memory_map/memory_map_backend.go b/weed/storage/backend/memory_map/memory_map_backend.go index 3f475d79f..57e3faedd 100644 --- a/weed/storage/backend/memory_map/memory_map_backend.go +++ b/weed/storage/backend/memory_map/memory_map_backend.go @@ -50,7 +50,7 @@ func (mmf *MemoryMappedFile) Close() error { func (mmf *MemoryMappedFile) GetStat() (datSize int64, modTime time.Time, err error) { stat, e := mmf.mm.File.Stat() if e == nil { - return stat.Size(), stat.ModTime(), nil + return mmf.mm.End_of_file+1, stat.ModTime(), nil } return 0, time.Time{}, err }