<p dir="ltr">We are working on some sort of distributed replacement for the locks in cinder, since file locks are limiting our ability to do HA. I'm afraid you're unlikely to get any traction until that work is done.</p>
<p dir="ltr">I also have a concern that some backend do not handle load well, and so benefit from the current serialisation. It might be necessary to push this lock down into the driver and allow each driver to choose it's locking model for snapshots.</p>
<div class="gmail_quote">On 27 Jun 2015 06:18, "niuzhenguo" <<a href="mailto:niuzhenguo@huawei.com">niuzhenguo@huawei.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="ZH-CN" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span lang="EN-US">Hi folks,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Currently we use a lockfile to protect the create operations from concurrent delete the source volume/snapshot, we use exclusive<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">locks on both delete and create sides which will ensure that:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p style="margin-left:18.0pt">
<u></u><span lang="EN-US"><span>1.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><u></u><span lang="EN-US">If a create of VolA from snap/VolB is in progress, any delete requests for snap/VolB will wait until the create is complete.<u></u><u></u></span></p>
<p style="margin-left:18.0pt">
<u></u><span lang="EN-US"><span>2.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><u></u><span lang="EN-US">If a delete of snap/VolA is in progress, any create from snap/VolA will wait until snap/VolA delete is complte.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">but, the exclusive locks will also result in:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p style="margin-left:18.0pt">
<u></u><span lang="EN-US"><span>3.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><u></u><span lang="EN-US">If a create of VolA from snap/VolB is inprogress, any other create requests from snap/VolB will wait until the create is complete.
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">So the create operations from same volume/snapshot can not process on parallel, please reference bp [1].<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I’d like to change the current filelock or introduce a new lock to oslo.concurrency.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Proposed change:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Add exclusive(write) locks for delete operations and shared(read) locks for create operations, to ensure that create from volume/snapshot<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">can work on parallel and protect create operations from concurrent delete the source volume/snapshot.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I’d like to get what’s your suggestions, thanks in advance.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">[1] <a href="https://blueprints.launchpad.net/cinder/+spec/enhance-locks" target="_blank">
https://blueprints.launchpad.net/cinder/+spec/enhance-locks</a><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">-zhenguo<u></u><u></u></span></p>
</div>
</div>

<br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div>