nfs-ganesha 1.4
|
Perform lookup through the cache. More...
#include "log.h"
#include "abstract_atomic.h"
#include "HashData.h"
#include "HashTable.h"
#include "fsal.h"
#include "cache_inode.h"
#include "cache_inode_avl.h"
#include "cache_inode_weakref.h"
#include "cache_inode_lru.h"
#include <unistd.h>
#include <sys/types.h>
#include <sys/param.h>
#include <time.h>
#include <pthread.h>
#include <assert.h>
Go to the source code of this file.
Functions | |
cache_entry_t * | cache_inode_lookup_impl (cache_entry_t *parent, fsal_name_t *name, fsal_op_context_t *context, cache_inode_status_t *status) |
Do the work of looking up a name in a directory. | |
cache_entry_t * | cache_inode_lookup (cache_entry_t *parent, fsal_name_t *name, fsal_attrib_list_t *attr, fsal_op_context_t *context, cache_inode_status_t *status) |
Public function for looking up a name in a directory. |
Perform lookup through the cache.
Perform lookup through the cache.
Definition in file cache_inode_lookup.c.
cache_entry_t* cache_inode_lookup | ( | cache_entry_t * | parent, |
fsal_name_t * | name, | ||
fsal_attrib_list_t * | attr, | ||
fsal_op_context_t * | context, | ||
cache_inode_status_t * | status | ||
) |
Public function for looking up a name in a directory.
Looks up for a name in a directory indicated by a cached entry. The directory should have been cached before.
If a cache entry is returned, the refcount on entry is +1.
[in] | parent | Entry for the parent directory to be managed. |
[in] | name | Name of the entry that we are looking up. |
[out] | attr | Attributes of the found entry. |
[in] | context | FSAL credentials |
[out] | pstatus | Returned status |
Definition at line 281 of file cache_inode_lookup.c.
cache_entry_t* cache_inode_lookup_impl | ( | cache_entry_t * | parent, |
fsal_name_t * | name, | ||
fsal_op_context_t * | context, | ||
cache_inode_status_t * | status | ||
) |
Do the work of looking up a name in a directory.
This function looks up a filename in the given directory. It implements the functionality of cache_inode_lookup and expects the directory to be read-locked when it is called. If a lookup from cache fails, it will drop the read lock and acquire a write lock before proceeding. The caller is responsible for freeing the lock on the directory in any case.
If a cache entry is returned, its refcount is incremented by 1.
[in] | parent | The directory to search |
[in] | name | The name to be looked up |
[in] | context | FSAL credentials |
[out] | status | Returned status |
Definition at line 86 of file cache_inode_lookup.c.