mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 14:20:19 +00:00
cephfs: add locks for volumegroup
Adding a lock for the volumegroup so that we can take care of serializing the same requests to ensure same requests are not served in parallel. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
b30da094b0
commit
ef25a816a7
@ -56,6 +56,10 @@ type ControllerServer struct {
|
|||||||
// A map storing all volumes/snapshots with ongoing operations.
|
// A map storing all volumes/snapshots with ongoing operations.
|
||||||
OperationLocks *util.OperationLock
|
OperationLocks *util.OperationLock
|
||||||
|
|
||||||
|
// A map storing all volumes with ongoing operations so that additional operations
|
||||||
|
// for that same volume (as defined by volumegroup ID/volumegroup name) return an Aborted error
|
||||||
|
VolumeGroupLocks *util.VolumeLocks
|
||||||
|
|
||||||
// Cluster name
|
// Cluster name
|
||||||
ClusterName string
|
ClusterName string
|
||||||
|
|
||||||
|
@ -67,6 +67,7 @@ func NewControllerServer(d *csicommon.CSIDriver) *ControllerServer {
|
|||||||
DefaultControllerServer: csicommon.NewDefaultControllerServer(d),
|
DefaultControllerServer: csicommon.NewDefaultControllerServer(d),
|
||||||
VolumeLocks: util.NewVolumeLocks(),
|
VolumeLocks: util.NewVolumeLocks(),
|
||||||
SnapshotLocks: util.NewVolumeLocks(),
|
SnapshotLocks: util.NewVolumeLocks(),
|
||||||
|
VolumeGroupLocks: util.NewVolumeLocks(),
|
||||||
OperationLocks: util.NewOperationLock(),
|
OperationLocks: util.NewOperationLock(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user