|
nfs-ganesha 1.4
|
routines for management of the cache_inode layer, More...
#include "abstract_atomic.h"#include "log.h"#include "HashData.h"#include "HashTable.h"#include "fsal.h"#include "cache_inode.h"#include "cache_inode_avl.h"#include "cache_inode_lru.h"#include "cache_inode_weakref.h"#include "nfs4_acls.h"#include <unistd.h>#include <sys/types.h>#include <sys/param.h>#include <time.h>#include <pthread.h>#include <string.h>#include <assert.h>Go to the source code of this file.
routines for management of the cache_inode layer,
Some routines for management of the cache_inode layer, shared by other calls.
Definition in file cache_inode_misc.c.
| cache_inode_status_t cache_inode_check_trust | ( | cache_entry_t * | entry, |
| fsal_op_context_t * | context | ||
| ) |
Conditionally refresh attributes.
This function tests whether we should still trust the current attributes and, if not, refresh them.
| [in] | entry | The entry to refresh |
| [in] | context | FSAL credentials |
Definition at line 929 of file cache_inode_misc.c.
| void cache_inode_clean_entry | ( | cache_entry_t * | entry | ) |
Final cleaning of an entry.
This function performs final cleanup of an entry before recycling or free.
| [in] | entry | The entry to be cleaned |
Definition at line 547 of file cache_inode_misc.c.
| int cache_inode_compare_key_fsal | ( | hash_buffer_t * | buff1, |
| hash_buffer_t * | buff2 | ||
| ) |
Compares two keys used in cache inode.
Compare two keys used in cache inode. These keys are basically made from FSAL related information.
| [in] | buff1 | First key |
| [in] | buff2 | Second key |
Definition at line 171 of file cache_inode_misc.c.
| const char* cache_inode_err_str | ( | cache_inode_status_t | err | ) |
Definition at line 67 of file cache_inode_misc.c.
| cache_inode_status_t cache_inode_error_convert | ( | fsal_status_t | fsal_status | ) |
Converts an FSAL error to the corresponding cache_inode error.
This function converts an FSAL error to the corresponding cache_inode error.
| [in] | fsal_status | FSAL error to be converted |
Definition at line 567 of file cache_inode_misc.c.
| bool_t cache_inode_file_holds_state | ( | cache_entry_t * | entry | ) | [inline] |
Return true if a file holds state.
This function returns true if state is held on the file. The state lock must be held for read when calling this function.
| [in] | entry | The file to be checked |
Definition at line 908 of file cache_inode_misc.c.
| cache_inode_file_type_t cache_inode_fsal_type_convert | ( | fsal_nodetype_t | type | ) |
converts an FSAL type to the corresponding cache_inode type
This function converts an FSAL type to the corresponding cache_inode type.
| [in] | type | The input FSAL type |
Definition at line 689 of file cache_inode_misc.c.
| cache_entry_t* cache_inode_new_entry | ( | cache_inode_fsal_data_t * | fsdata, |
| fsal_attrib_list_t * | attr, | ||
| cache_inode_file_type_t | type, | ||
| cache_inode_create_arg_t * | create_arg, | ||
| cache_inode_status_t * | status | ||
| ) |
Adds a new entry to the cache.
This funcion adds a new entry to the cache. It will allocate entries of any kind.
| [in] | fsdata | FSAL data for the entry to be created |
| [in] | attr | Attributes to be stored in the cache entry (must not be NULL) |
| [in] | type | Type of entry to create |
| [in] | create_arg | Type specific creation data |
| [out] | status | Returned status |
Definition at line 246 of file cache_inode_misc.c.
| void cache_inode_print_dir | ( | cache_entry_t * | entry | ) |
Prints the content of a directory.
This debugging function prints the contents of a directory.
| [in] | entry | the input pentry. |
Definition at line 783 of file cache_inode_misc.c.
| void cache_inode_release_dirents | ( | cache_entry_t * | entry, |
| cache_inode_avl_which_t | which | ||
| ) |
Release cached directory content.
This function releases the cached directory entries on a directory cache entry.
| [in] | entry | Directory to have entries be released |
| [in] | which | Caches to clear (dense, sparse, or both) |
Definition at line 840 of file cache_inode_misc.c.
| void cache_inode_release_symlink | ( | cache_entry_t * | entry | ) |
Release symlink content.
This function releases an entry's symlink content, if present.
| [in] | entry |
Definition at line 819 of file cache_inode_misc.c.
| int cache_inode_set_time_current | ( | fsal_time_t * | time | ) | [inline] |
Set the fsal_time in a pentry struct to the current time.
Sets the fsal_time in a pentry struct to the current time. This function is using gettimeofday.
| [out] | time | Pointer to time to be set |
Definition at line 212 of file cache_inode_misc.c.
| bool_t cache_inode_types_are_rename_compatible | ( | cache_entry_t * | src, |
| cache_entry_t * | dest | ||
| ) |
Test if an entry can be overwritten during a rename.
This function checks if an existing entry can be overwritten by a rename operation.
| [in] | src | The source file |
| [in] | dest | The destination file |
Definition at line 747 of file cache_inode_misc.c.
Definition at line 65 of file cache_inode_misc.c.
Global memory pools for cached data
Definition at line 63 of file cache_inode_misc.c.
Definition at line 60 of file cache_inode_misc.c.
Definition at line 61 of file cache_inode_misc.c.
Definition at line 64 of file cache_inode_misc.c.
1.7.3