ping_pong: add -l option
authorRalph Boehme <slow@samba.org>
Sat, 9 May 2015 23:39:16 +0000 (01:39 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 10 Dec 2015 07:48:38 +0000 (08:48 +0100)
commit2f16675a2294c8197ad45862c3e8a4fa2061d2e9
tree59c792125bd6aa182a06a6dae4c9fc9fe6ebd568
parent3c6ea3293c6aac67bc442f47185fd494714e4806
ping_pong: add -l option

Add a new option -l to check whether POSIX byte range locks are
working. Usage:

node1$ touch /path/to/cluster-fs/FILE

node1$ ./bin/ping_pong -l /path/to/cluster-fs/FILE
Holding lock, press any key to continue...
You should run the same command on another node now.

node2$ ./bin/ping_pong -l /path/to/cluster-fs/FILE

Output can either be:

  Holding lock, press any key to continue...

This means POSIX byte range locks are *not* working.

If you see this instead:

  file already locked, calling check_lock to tell us who has it locked...:
  check_lock failed: lock held: pid='27375', type='1', start='0', len='0'
  Working POSIX byte range locks

Congrats, you have a cluster fs with functional byte range locks!

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Dec 10 08:48:38 CET 2015 on sn-devel-104
ctdb/utils/ping_pong/ping_pong.c