diff options
| author | chrislu <chris.lu@gmail.com> | 2022-02-16 09:11:34 -0800 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-02-16 09:11:34 -0800 |
| commit | a129bda7d98bdbd8ca41c3aeb94739582686a6f1 (patch) | |
| tree | 023020d98dd70a9521e200704bcbf370103d760f /weed/storage/disk_location.go | |
| parent | 118d0e01a8aadf5e52f87412bd2db3e7a0e31839 (diff) | |
| download | seaweedfs-a129bda7d98bdbd8ca41c3aeb94739582686a6f1.tar.xz seaweedfs-a129bda7d98bdbd8ca41c3aeb94739582686a6f1.zip | |
sync data first before stopping
Diffstat (limited to 'weed/storage/disk_location.go')
| -rw-r--r-- | weed/storage/disk_location.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/weed/storage/disk_location.go b/weed/storage/disk_location.go index af4ec1eb4..d618db296 100644 --- a/weed/storage/disk_location.go +++ b/weed/storage/disk_location.go @@ -317,6 +317,16 @@ func (l *DiskLocation) VolumesLen() int { return len(l.volumes) } +func (l *DiskLocation) SetStopping() { + l.volumesLock.Lock() + for _, v := range l.volumes { + v.SetStopping() + } + l.volumesLock.Unlock() + + return +} + func (l *DiskLocation) Close() { l.volumesLock.Lock() for _, v := range l.volumes { |
