aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormtolman <5067918+mtolman@users.noreply.github.com>2018-04-17 13:26:48 -0600
committerGitHub <noreply@github.com>2018-04-17 13:26:48 -0600
commite4b1e5c3c80ce9faf3a5f13942300a03093fc319 (patch)
treef6afb3b452f667ee10eebadaf667f7022f076ab9
parentd49e91cd7815534dc11f0e8f58fdc0ef76923065 (diff)
downloadseaweedfs-e4b1e5c3c80ce9faf3a5f13942300a03093fc319.tar.xz
seaweedfs-e4b1e5c3c80ce9faf3a5f13942300a03093fc319.zip
Fix for issue #635
Fix for the following issue on master: https://github.com/chrislusf/seaweedfs/issues/635
-rw-r--r--weed/storage/volume.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/storage/volume.go b/weed/storage/volume.go
index f168ad155..a58a74340 100644
--- a/weed/storage/volume.go
+++ b/weed/storage/volume.go
@@ -61,7 +61,7 @@ func (v *Volume) Size() int64 {
return stat.Size()
}
glog.V(0).Infof("Failed to read file size %s %v", v.dataFile.Name(), e)
- return -1
+ return 0 // -1 causes integer overflow and the volume to become unwritable.
}
// Close cleanly shuts down this volume