]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ocfs2: use the new DLM operation callbacks while requesting new lockspace
authorGoldwyn Rodrigues <rgoldwyn@suse.de>
Mon, 16 Dec 2013 23:44:56 +0000 (10:44 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 16 Dec 2013 23:44:56 +0000 (10:44 +1100)
commita8d437a8a7066e369e9aa96cf0a32fe94981d202
treeba9aeac70b9003be10a98273d025b6ec37373c49
parentb435fe606d9be8152a022943eb8de28a5b4d6bdd
ocfs2: use the new DLM operation callbacks while requesting new lockspace

Attempt to use the new DLM operations.  If it is not supported, use the
traditional ocfs2_controld.

To exchange ocfs2 versioning, we use the LVB of the version dlm lock.  It
first attempts to take the lock in EX mode (non-blocking).  If successful
(which means it is the first mount), it writes the version number and
downconverts to PR lock.  If it is unsuccessful, it reads the version from
the lock.

If this becomes the standard (with o2cb as well), it could simplify
userspace tools to check if the filesystem is mounted on other nodes.

Dan: Since ocfs2_protocol_version are two u8 values, the additional
checks with LONG* don't make sense.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/ocfs2/stack_user.c