ocfs2_dlmfs: Use poll() to signify BASTs.
authorJoel Becker <joel.becker@oracle.com>
Wed, 27 Jan 2010 06:14:20 +0000 (22:14 -0800)
committerJoel Becker <joel.becker@oracle.com>
Fri, 26 Feb 2010 23:41:14 +0000 (15:41 -0800)
commit65b6f3403431cd43ef7b0dab679a50f770124a65
tree3f9e8c88926fa3c3fe40bc8fab20dabd8496e307
parent14a437c2b67aeee2a989a5d9c7e19094355d2fed
ocfs2_dlmfs: Use poll() to signify BASTs.

o2dlm's userspace filesystem is an easy way to use the DLM from
userspace.  It is intentionally simple. For example, it does not allow
for asynchronous behavior or lock conversion.  This is intentional to
keep the interface simple.

Because there is no asynchronous notification, there is no way for a
process holding a lock to know another node needs the lock.  This is the
number one complaint of ocfs2_dlmfs users.  Turns out, we can solve this
very easily.  We add poll() support to ocfs2_dlmfs.  When a BAST is
received, the lock's file descriptor will receive POLLIN.

This is trivial to implement.  Userdlm already has an appropriate
waitqueue, and the lock knows when it is blocked.

We add the "bast" capability to tell userspace this is available.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Acked-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/dlm/dlmfs.c