<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <pre>Hi,

As of today most gluster commands take a cluster wide lock, before performing their respective operations. As a result 
any two gluster commands, which have no interdependency with each other, can't be executed simultaneously. To 
remove this interdependency we propose to replace this cluster wide lock with a volume specific lock, so that two 
operations on two different volumes can be performed simultaneously.

By implementing this volume wide lock, our agenda is to achieve the following:
1. Allowing simultaneous volume operations on different volumes. Performing two operations simultaneously on the same 
   volume should not be allowed.
2. While a volume is being created, or deleted, operations(like rebalance, geo-rep) should be permitted on other volumes.
3. Two simultaneous volume create or volume delete operations should not be permitted.

We propose to do this in two steps:

1. <b>Implementing the volume wide lock:</b> In order to implement this, we will add a lock consisting of the uuid of the 
   originator, to the in-memory volinfo(of that particular volume), in all the nodes of the cluster. Once this lock is 
   taken, any other command for the same volume, will not be able to acquire this lock from that particular volume's 
   volinfo. Meanwhile other operations on other volumes can still be executed.

2. <b>Stop using the cluster lock for existing commands:</b> Port existing commands to use this framework. We will use 
   op-version to take care of backward compatibility for the existing commands. We need to take care of commands like 
   volume create, volume delete, rebalance callbacks, implicit volume syncs (when a node comes up), the volume sync 
   command which modify the priv-&gt;volumes, and also other non-volume operations which work inside the gambit of the 
   cluster locks today while implementing this. 
   
Please feel free to provide feedback.

Regards,
Avra
</pre>
  </body>
</html>