aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/volume.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/storage/volume.go')
-rw-r--r--weed/storage/volume.go18
1 files changed, 1 insertions, 17 deletions
diff --git a/weed/storage/volume.go b/weed/storage/volume.go
index 1a9c8bd24..ab8af91e2 100644
--- a/weed/storage/volume.go
+++ b/weed/storage/volume.go
@@ -180,21 +180,6 @@ func (v *Volume) DiskType() types.DiskType {
return v.location.DiskType
}
-func (v *Volume) SetStopping() {
- v.dataFileAccessLock.Lock()
- defer v.dataFileAccessLock.Unlock()
- if v.nm != nil {
- if err := v.nm.Sync(); err != nil {
- glog.Warningf("Volume SetStopping fail to sync volume idx %d", v.Id)
- }
- }
- if v.DataBackend != nil {
- if err := v.DataBackend.Sync(); err != nil {
- glog.Warningf("Volume SetStopping fail to sync volume %d", v.Id)
- }
- }
-}
-
func (v *Volume) SyncToDisk() {
v.dataFileAccessLock.Lock()
defer v.dataFileAccessLock.Unlock()
@@ -228,10 +213,9 @@ func (v *Volume) Close() {
v.nm = nil
}
if v.DataBackend != nil {
- if err := v.DataBackend.Sync(); err != nil {
+ if err := v.DataBackend.Close(); err != nil {
glog.Warningf("Volume Close fail to sync volume %d", v.Id)
}
- _ = v.DataBackend.Close()
v.DataBackend = nil
stats.VolumeServerVolumeCounter.WithLabelValues(v.Collection, "volume").Dec()
}