[Ocfs2-users] ocfs2 and file locking?

Sunil Mushran sunil.mushran at oracle.com
Mon Jun 1 10:35:11 PDT 2009


jhonyl wrote:
> I am trying to figure out about locking under ocfs2.
>
> I read in the 1.4 ocfs2 pdf doc file that ocfs2 1.4 support flock but 
> not fcntl locks, and in a message, I read that ocfs2 rely on vfs for 
> fcntl, and I read something about being able to get fcntl locks but not 
> with o2cb.
>
> What is the current status of the issue?
>
> Would programs that rely on fcntl be able to run on a single node?
>
> If someone knows about this, and can explain a bit, I would like to 
> know what is the current status of file locking under ocfs2, and if it 
> can be made to work.

Support for fcntl locking aka file-range locking aka posix locking is
provided by vfs for all file systems. However, that support is appropriate
only for local file systems.

In ocfs2, we have added support for cluster-aware fcntl locking via
the userspace clustering framework that allows one to use ocfs2 with
different cluster-stacks. Like pacemaker (novell) and cman (red hat).

If you want to use this today, your only option is to use sles11 that is
shipping ocfs2+pacemaker. With (rh)el6, expected next year, the same
will be supported with cman too.

BTW, local fcntl locking support is available as is today.



More information about the Ocfs2-users mailing list