diff --git a/src/main.c b/src/main.c index 7e905a9..92669ff 100644 --- a/src/main.c +++ b/src/main.c @@ -2664,7 +2664,7 @@ static int do_client(void) case ACT_ACQUIRE: log_tool("acquire pid %d", com.pid); flags |= com.orphan ? SANLK_ACQUIRE_ORPHAN : 0; - rv = sanlock_acquire(-1, com.pid, 0, com.res_count, com.res_args, NULL); + rv = sanlock_acquire(-1, com.pid, flags, com.res_count, com.res_args, NULL); log_tool("acquire done %d", rv); break;
Fixed in:
commit e66d5d1 Author: David Teigland teigland@redhat.com Date: Fri Aug 1 16:11:42 2014 -0500
sanlock: persistent and orphan resource leases If a resource lease has the PERSISTENT flag set when it is acquired, then sanlock will not release the lease if the process holding the lease exits. Instead, the lease is moved to the orphans list. From the perspective of other hosts, and on disk, there is no difference between a held lease and an orphan lease. On the origin host, another process can acquire an orphan lease by using the ACQUIRE_ORPHAN flag, or release an orphan lease using the REL_ORPHAN flag. All orphan leases in a lockspace can be released using REL_ORPHAN and setting the lockspace name and an empty resource name. If the lockspace config flag SANLK_CONFIG_USED_BY_ORPHANS is set, then an orphan resource in a lockspace will have the same effect on the lockspace as the USED flag or clients holding resources that have not exited. Other things on the host may still be using resources that are protected by the orphaned resource lease, so it is not safe to release the lockspace, which would allow another host to acquire the orphan lease. If SANLK_CONFIG_USED_BY_ORPHANS is not set, then orphans will have no effect on the removal of a lockspace. When the lockspace is removed, the orphans will just be left. Signed-off-by: David Teigland <teigland@redhat.com>
Metadata Update from @nsoffer: - Issue status updated to: Closed (was: Open)
Login to comment on this ticket.