nfs-ganesha 1.4
Functions

cache_inode_lookup.c File Reference

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_tcache_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_tcache_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.

Detailed Description

Perform lookup through the cache.

Author:
Author:
deniel
Date:
Date:
2005/11/28 17:02:26
Version:
Revision:
1.33

Perform lookup through the cache.

Definition in file cache_inode_lookup.c.


Function Documentation

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.

Parameters:
[in]parentEntry for the parent directory to be managed.
[in]nameName of the entry that we are looking up.
[out]attrAttributes of the found entry.
[in]contextFSAL credentials
[out]pstatusReturned status
Returns:
The found entry or NUL.

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.

Parameters:
[in]parentThe directory to search
[in]nameThe name to be looked up
[in]contextFSAL credentials
[out]statusReturned status
Returns:
The cache entry corresponding to name or NULL on error.

Definition at line 86 of file cache_inode_lookup.c.