ctdb-mutex: Factor out function fcntl_lock_fd()
commitc07e81abf04c20fb591376efcaa9b738a60c1a58
authorMartin Schwenke <martin@meltin.net>
Tue, 8 Feb 2022 00:56:46 +0000 (8 11:56 +1100)
committerMartin Schwenke <martins@samba.org>
Thu, 28 Jul 2022 10:09:34 +0000 (28 10:09 +0000)
tree56b9234317856d5fdd2323be4d080fba56a8f85d
parent9daf22a5c9d4ccdd706de883141ed807cab4df92
ctdb-mutex: Factor out function fcntl_lock_fd()

Allows blocking mode and start offset to be specified.  Always locks a
1-byte range.

Make the lock structure static to avoid initialising the whole
structure each time.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_mutex_fcntl_helper.c