[openstack-dev] [cinder][oslo] Locks for create from volume/snapshot
niuzhenguo at huawei.com
Sat Jun 27 03:16:41 UTC 2015
Currently we use a lockfile to protect the create operations from concurrent delete the source volume/snapshot, we use exclusive
locks on both delete and create sides which will ensure that:
1. If a create of VolA from snap/VolB is in progress, any delete requests for snap/VolB will wait until the create is complete.
2. If a delete of snap/VolA is in progress, any create from snap/VolA will wait until snap/VolA delete is complte.
but, the exclusive locks will also result in:
3. If a create of VolA from snap/VolB is inprogress, any other create requests from snap/VolB will wait until the create is complete.
So the create operations from same volume/snapshot can not process on parallel, please reference bp .
I'd like to change the current filelock or introduce a new lock to oslo.concurrency.
Add exclusive(write) locks for delete operations and shared(read) locks for create operations, to ensure that create from volume/snapshot
can work on parallel and protect create operations from concurrent delete the source volume/snapshot.
I'd like to get what's your suggestions, thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev