ctdb-scripts: Simplify logic in debug_via_proc_locks()
commitdd5972b69916fa08b114193d644faf3ae58c550b
authorMartin Schwenke <martin@meltin.net>
Mon, 4 Jan 2021 02:35:11 +0000 (4 13:35 +1100)
committerAmitay Isaacs <amitay@samba.org>
Fri, 28 May 2021 06:46:29 +0000 (28 06:46 +0000)
treeab03d72982b30536908ce266332a05adb97cbd51
parente62ae53ef6d04016e3a3453380c9add3ce888e3c
ctdb-scripts: Simplify logic in debug_via_proc_locks()

The path of the TDB is known, so calculate the file ID (device number
+ inode number) from it and use this to directly filter /proc/locks to
find processes holding locks.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/config/debug_locks.sh
ctdb/tests/UNIT/eventscripts/scripts/debug_locks.sh
ctdb/tests/UNIT/eventscripts/stubs/stat