NLM_TEST - Test Lock
-
-
struct nlm_testargs {
netobj cookie;
bool exclusive;
struct nlm_lock alock;
};
-
-
struct nlm_testres {
netobj cookie;
nlm_testrply test_stat;
};
-
-
nlm_testres
NLM_TEST(nlm_testargs) = 1;
This procedure tests to see whether the monitored lock specified by "alock" is available to this client.
When the procedure returns, "test_stat.stat" will be set to one of the following values:
- LCK_GRANTED
- Indicates that the procedure call completed successfully. The server would be able to grant the lock in question.
- LCK_DENIED
- Indicates that the test failed as it conflicted with existing lock reservations for the file. "test_stat.holder" describes the current holder of the lock as follows. The boolean "exclusive" indicates whether the lock is exclusively held by the current holder or whether other locks are permitted. The integer "uppid" provides a unique per-process identifier for lock differentiation. The unsigned values "l_offset" and "l_len" define the region of the file locked by this holder.
- LCK_DENIED_NOLOCKS
Indicates that the procedure call failed because the server NLM could not allocate the resources needed to process the request.
- LCK_DENIED_GRACE_PERIOD
Indicates that the procedure call failed because the server host has recently been rebooted and the server NLM is re-establishing existing locks, and is not yet ready to accept normal service requests.
Contents | Next section | Index |