nfs-ganesha 1.4
|
#include <unistd.h>
#include <sys/types.h>
#include <sys/param.h>
#include <time.h>
#include <pthread.h>
#include <string.h>
#include "LRU_List.h"
#include "log.h"
#include "HashData.h"
#include "HashTable.h"
#include "nfs_core.h"
#include "nfs4.h"
#include "fsal.h"
#include "sal_functions.h"
#include "cache_inode_lru.h"
Go to the source code of this file.
Functions | |
int | state_conflict (state_t *pstate, state_type_t state_type, state_data_t *pstate_data) |
state_status_t | state_add_impl (cache_entry_t *pentry, state_type_t state_type, state_data_t *pstate_data, state_owner_t *powner_input, fsal_op_context_t *pcontext, state_t **ppstate, state_status_t *pstatus) |
state_status_t | state_add (cache_entry_t *pentry, state_type_t state_type, state_data_t *pstate_data, state_owner_t *powner_input, fsal_op_context_t *pcontext, state_t **ppstate, state_status_t *pstatus) |
state_status_t | state_del_locked (state_t *pstate, cache_entry_t *pentry) |
state_status_t | state_del (state_t *pstate, state_status_t *pstatus) |
void | state_nfs4_state_wipe (cache_entry_t *pentry) |
void | release_lockstate (state_owner_t *plock_owner) |
void | release_openstate (state_owner_t *popen_owner) |
This file contains functions used in state management.
Definition in file nfs4_state.c.
void release_lockstate | ( | state_owner_t * | plock_owner | ) |
release_lockstate: Remove every state belonging to the lock owner.
Remove every state belonging to the lock owner.
plock_owner | [IN] lock owner to release state for. |
Definition at line 402 of file nfs4_state.c.
void release_openstate | ( | state_owner_t * | popen_owner | ) |
release_openstate: Remove every state belonging to the open owner.
Remove every state belonging to the open owner.
popen_owner | [IN] open owner to release state for. |
Definition at line 444 of file nfs4_state.c.
state_status_t state_add | ( | cache_entry_t * | pentry, |
state_type_t | state_type, | ||
state_data_t * | pstate_data, | ||
state_owner_t * | powner_input, | ||
fsal_op_context_t * | pcontext, | ||
state_t ** | ppstate, | ||
state_status_t * | pstatus | ||
) |
state_add: adds a new state to a file pentry
Adds a new state to a file pentry
pentry | [INOUT] cache entry to operate on |
state_type | [IN] state to be defined |
pstate_data | [IN] data related to this state |
powner_input | [IN] related open_owner |
pcontext | [IN] FSAL credentials |
ppstate | [OUT] pointer to a pointer to the new state |
pstatus | [OUT] returned status |
Definition at line 270 of file nfs4_state.c.
state_status_t state_add_impl | ( | cache_entry_t * | pentry, |
state_type_t | state_type, | ||
state_data_t * | pstate_data, | ||
state_owner_t * | powner_input, | ||
fsal_op_context_t * | pcontext, | ||
state_t ** | ppstate, | ||
state_status_t * | pstatus | ||
) |
state_add_impl: adds a new state to a file pentry
Adds a new state to a file pentry. This version of the function does not take the state lock on the entry. It exists to allow callers to integrate state into a larger operation.
pentry | [INOUT] cache entry to operate on |
state_type | [IN] state to be defined |
pstate_data | [IN] data related to this state |
powner_input | [IN] related open_owner |
pcontext | [IN] FSAL credentials |
ppstate | [OUT] pointer to a pointer to the new state |
pstatus | [OUT] returned status |
Definition at line 126 of file nfs4_state.c.
int state_conflict | ( | state_t * | pstate, |
state_type_t | state_type, | ||
state_data_t * | pstate_data | ||
) |
state_conflict : checks for a conflict between an existing state and a candidate state.
Checks for a conflict between an existing state and a candidate state.
pstate | [IN] existing state |
state_type | [IN] type of candidate state |
pstate_data | [IN] data for the candidate state |
layout conflict is managed by the FSAL
Definition at line 72 of file nfs4_state.c.
state_status_t state_del | ( | state_t * | pstate, |
state_status_t * | pstatus | ||
) |
state_del: deletes a state from the hash's state
Deletes a state from the hash's state
pstate | [OUT] pointer to the new state |
pstatus | [OUT] returned status |
Definition at line 363 of file nfs4_state.c.
state_status_t state_del_locked | ( | state_t * | pstate, |
cache_entry_t * | pentry | ||
) |
Definition at line 300 of file nfs4_state.c.
void state_nfs4_state_wipe | ( | cache_entry_t * | pentry | ) |
Definition at line 377 of file nfs4_state.c.