ping_pong: add -l option
authorRalph Boehme <slow@samba.org>
Sat, 9 May 2015 23:39:16 +0000 (01:39 +0200)
committerMartin Schwenke <martin@meltin.net>
Wed, 24 Feb 2016 10:44:28 +0000 (21:44 +1100)
commit7fa2e78ea48603423cdb0d17dd4b69bf22237e16
tree36d2c4ba77858708e7e50c17feaa80e4d942361d
parentf6bd7256a50daa99d2bd8e4d83b613d8bd4d6d24
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

(Imported from commit 2f16675a2294c8197ad45862c3e8a4fa2061d2e9)
utils/ping_pong/ping_pong.c