OK great, that made it clear. I didn&#39;t know that locking was a bit of a can of worms after reading a few pages on in.<br><br>I
 did very quickly modify the ping_pong code to change the locking 
mechanism to flock and the o2cb stack locks as expected producing 
slightly better performance than cman.<br>
<br>From <a href="http://wiki.samba.org/index.php/CTDB_Setup" target="_blank">http://wiki.samba.org/index.php/CTDB_Setup</a><br><br>OCFS2 1.4 offers cluster-wide byte-range locking, but the OCFS2
 1.2 filesystem will need special handling, as it does not support 
cluster wide byte range locking. To work around this you will need to 
use some other sort of shared filesystem (such as NFS) for the &quot;private 
directory&quot; in Samba and the CTDB_RECOVERY_LOCK file in CTDB.
<br><br>So I take it that to use samba ocfs2 you need to use cman or 
pacemaker as they support byte range locking or as suggested above use 
NFS for certain directories and the o2cb stack<br><br>Thanks for your time, Dan<br><br><div class="gmail_quote">On 18 January 2011 19:06, Sunil Mushran <span dir="ltr">&lt;<a href="mailto:sunil.mushran@oracle.com">sunil.mushran@oracle.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

  
    
  
  <div bgcolor="#ffffff" text="#000000">
    fcntl() locking does not pair at all with dlm locking. So both ocfs2
    and gfs2<br>
    use a special scheme just for this lock. Both use the ordered
    messaging <br>
    provided by the corosync cluster engine. This lock is fully
    synchronised and<br>
    thus is not as performant as it can be. (Both cman and pacemaker use
    cce.)<br>
    <br>
    But that&#39;s ok because fcntl()&#39;s locking semantics is not what you
    think it is.<br>
    The lock is almost useless in this day and age. The only use is
    supporting<br>
    legacy apps. For more refer to Jeremy Allison&#39;s overview of this
    user lock.<br>
<a href="http://www.samba.org/samba/news/articles/low_point/tale_two_stds_os2.html" target="_blank">http://www.samba.org/samba/news/articles/low_point/tale_two_stds_os2.html</a><br>
    <br>
    Given that and considering most apps allow users to choose between
    fcntl()<br>
    and flock(), we&#39;ve decided for now to just support the latter with
    o2cb.<br>
    <br>
    flock() pairs well with dlm locking.<div><div></div><div class="h5"><br>
    <br>
    On 01/18/2011 10:22 AM, Dan Warner wrote:
    </div></div><blockquote type="cite"><div><div></div><div class="h5">OK thanks for the clarification.<br>
      <br>
      Is the support of fcntl() locking within o2cb, on the wishlist of
      features to be implemented at a future date? Is it even a priority
      to do?<br>
      <br>
      Thanks, Dan<br>
      <br>
      <div class="gmail_quote">
        On 18 January 2011 18:00, Sunil Mushran <span dir="ltr">&lt;<a href="mailto:sunil.mushran@oracle.com" target="_blank">sunil.mushran@oracle.com</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
          <div bgcolor="#ffffff" text="#000000"> ping_long tests the
            fcntl() user locks.<br>
            <br>
            ocfs2 supports clustered fcntl() locking with cman and
            pacemaker<br>
            cluster stacks. Not with o2cb.<br>
            <br>
            ocfs2 supports clustered flock() with all stacks. o2cb, cman
            and pacemaker. </div>
        </blockquote>
      </div>
      <br>
      </div></div><pre><fieldset></fieldset>
_______________________________________________
Ocfs2-users mailing list
<div class="im"><a href="mailto:Ocfs2-users@oss.oracle.com" target="_blank">Ocfs2-users@oss.oracle.com</a>
<a href="http://oss.oracle.com/mailman/listinfo/ocfs2-users" target="_blank">http://oss.oracle.com/mailman/listinfo/ocfs2-users</a></div></pre>
    </blockquote>
    <br>
  </div>

</blockquote></div><br>