aboutsummaryrefslogtreecommitdiff
path: root/weed/filer/filechunks.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-11-15 06:33:36 -0800
committerchrislu <chris.lu@gmail.com>2022-11-15 06:33:36 -0800
commit70a4c98b00d811c01289f26d3602992a0d3f45e1 (patch)
tree8d650eb24623e503ec03ccf45a73f3e61afdbe65 /weed/filer/filechunks.go
parent371972a1c212205b51391c17c064e9ea452fee17 (diff)
downloadseaweedfs-70a4c98b00d811c01289f26d3602992a0d3f45e1.tar.xz
seaweedfs-70a4c98b00d811c01289f26d3602992a0d3f45e1.zip
refactor filer_pb.Entry and filer.Entry to use GetChunks()
for later locking on reading chunks
Diffstat (limited to 'weed/filer/filechunks.go')
-rw-r--r--weed/filer/filechunks.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/filer/filechunks.go b/weed/filer/filechunks.go
index 965c73a77..de57a0532 100644
--- a/weed/filer/filechunks.go
+++ b/weed/filer/filechunks.go
@@ -31,19 +31,19 @@ func FileSize(entry *filer_pb.Entry) (size uint64) {
fileSize = maxUint64(fileSize, uint64(entry.RemoteEntry.RemoteSize))
}
}
- return maxUint64(TotalSize(entry.Chunks), fileSize)
+ return maxUint64(TotalSize(entry.GetChunks()), fileSize)
}
func ETag(entry *filer_pb.Entry) (etag string) {
if entry.Attributes == nil || entry.Attributes.Md5 == nil {
- return ETagChunks(entry.Chunks)
+ return ETagChunks(entry.GetChunks())
}
return fmt.Sprintf("%x", entry.Attributes.Md5)
}
func ETagEntry(entry *Entry) (etag string) {
if entry.Attr.Md5 == nil {
- return ETagChunks(entry.Chunks)
+ return ETagChunks(entry.GetChunks())
}
return fmt.Sprintf("%x", entry.Attr.Md5)
}