mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
![]() Right now we seem to have 3 locks. - devinfo.lock This is a per device lock - metaData.devicesLock This is supposedely protecting map of devices. - Global DeviceSet lock This is protecting map of devices as well as serializing calls to libdevmapper. Semantics of per devices lock and global deviceset lock seem to be very clear. Even ordering between these two locks has been defined properly. What is not clear is the need and ordering of metaData.devicesLock. Looks like this lock is not necessary and global DeviceSet lock should be used to protect map of devices as it is part of DeviceSet. This patchset gets rid of metaData.devicesLock and instead uses DeviceSet lock to protect map of devices. Also at couple of places during initialization takes devices.Lock(). That is not strictly necessary as there is supposed to be one thread of execution during initializaiton. Still it makes the code clearer. I think this makes code more clear and easier to understand and easier to make further changes. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> |
||
---|---|---|
.. | ||
aufs | ||
btrfs | ||
devmapper | ||
graphtest | ||
overlay | ||
vfs | ||
windows | ||
zfs | ||
driver.go | ||
driver_freebsd.go | ||
driver_linux.go | ||
driver_unsupported.go | ||
driver_windows.go | ||
fsdiff.go | ||
imagerestorer.go |