deleg: use delegations to satisfy opens locally
added delegation.c and .h nfs41_client stores a list of nfs41_delegation_state new function nfs41_delegate_open() to look for a compatible delegation before calling nfs41_open() if nfs41_open() is granted a delegation, call nfs41_delegation_granted() to register it with the client client calls nfs41_client_delegation_free() on unmount to free list of delegations Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
parent
0c874a66ba
commit
0bee545e91
7 changed files with 345 additions and 16 deletions
|
|
@ -30,6 +30,7 @@
|
|||
#include <winsock2.h> /* for hostent struct */
|
||||
|
||||
#include "tree.h"
|
||||
#include "delegation.h"
|
||||
#include "daemon_debug.h"
|
||||
#include "nfs41_ops.h"
|
||||
|
||||
|
|
@ -248,6 +249,7 @@ int nfs41_client_create(
|
|||
goto out_err_client;
|
||||
|
||||
list_init(&client->state.opens);
|
||||
list_init(&client->state.delegations);
|
||||
InitializeCriticalSection(&client->state.lock);
|
||||
|
||||
//initialize a lock used to protect access to client id and client id seq#
|
||||
|
|
@ -326,6 +328,7 @@ void nfs41_client_free(
|
|||
IN nfs41_client *client)
|
||||
{
|
||||
dprintf(2, "nfs41_client_free(%llu)\n", client->clnt_id);
|
||||
nfs41_client_delegation_free(client);
|
||||
if (client->session) nfs41_session_free(client->session);
|
||||
nfs41_destroy_clientid(client->rpc, client->clnt_id);
|
||||
if (client->server) nfs41_server_deref(client->server);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue