rbd: take lock on targetpath during node operation

We should not be dependent on the CO to ensure
that it will serialize the request instead of
that we need to have own internal locks to ensure
that we dont do concurrent operations for same
request.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2024-11-20 10:07:38 +01:00
committed by mergify[bot]
parent 23c1d7c3e2
commit b6bd8ca71a
2 changed files with 17 additions and 4 deletions

View File

@ -28,6 +28,9 @@ const (
// SnapshotOperationAlreadyExistsFmt string format to return for concurrent operation.
SnapshotOperationAlreadyExistsFmt = "an operation with the given Snapshot ID %s already exists"
// TargetPathOperationAlreadyExistsFmt string format to return for concurrent operation on target path.
TargetPathOperationAlreadyExistsFmt = "an operation with the given target path %s already exists"
)
// VolumeLocks implements a map with atomic operations. It stores a set of all volume IDs