Using a fixed set of locks, then we don't need to free unused locks

anymore.
See kubernetes/kubernetes/pull/66442 for discussions.
This commit is contained in:
Yecheng Fu
2018-08-13 13:11:39 +08:00
parent a1b3133b46
commit 798838a6a0
11 changed files with 115 additions and 93 deletions

View File

@@ -59,7 +59,7 @@ const (
func (plugin *localVolumePlugin) Init(host volume.VolumeHost) error {
plugin.host = host
plugin.volumeLocks = keymutex.NewKeyMutex()
plugin.volumeLocks = keymutex.NewHashed(0)
plugin.recorder = host.GetEventRecorder()
return nil
}