nfs-ganesha 1.4
Functions

cache_inode_lookupp.c File Reference

Perform lookup through the cache to get the parent entry for a directory. More...

#include "log.h"
#include "HashData.h"
#include "HashTable.h"
#include "fsal.h"
#include "cache_inode.h"
#include "cache_inode_lru.h"
#include "cache_inode_weakref.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_lookupp_impl (cache_entry_t *entry, fsal_op_context_t *context, cache_inode_status_t *status)
 Implements parent lookup functionality.
cache_entry_tcache_inode_lookupp (cache_entry_t *entry, fsal_op_context_t *context, cache_inode_status_t *status)
 Public function to look up a directory's parent.

Detailed Description

Perform lookup through the cache to get the parent entry for a directory.

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

cache_inode_lookupp.c : Perform lookup through the cache to get the parent entry for a directory.

Definition in file cache_inode_lookupp.c.


Function Documentation

cache_entry_t* cache_inode_lookupp ( cache_entry_t entry,
fsal_op_context_t context,
cache_inode_status_t status 
)

Public function to look up a directory's parent.

This function looks up (and potentially caches) the parent of a directory.

If a cache entry is returned, its refcount is +1.

Parameters:
[in]entryEntry whose parent is to be obtained.
[in]contextFSAL credentials
[out]statusReturned status
Returns:
the found entry or NULL on error.

Definition at line 183 of file cache_inode_lookupp.c.

cache_entry_t* cache_inode_lookupp_impl ( cache_entry_t entry,
fsal_op_context_t context,
cache_inode_status_t status 
)

Implements parent lookup functionality.

Looks up (and caches) the parent directory for a directory. If an entry is returned, that entry's refcount is incremented by one. The caller must hold a reference on the entry. It is expected that the caller holds the directory lock on entry. It is also expected that the caller will relinquish the directory lock after return. If result was not cached, the function will drop the read lock and acquire a write lock so it can add the result to the cache.

Parameters:
[in]entryEntry whose parent is to be obtained
[in]contextFSAL operation context
[out]statusReturned status
Returns:
the found entry or NULL on error.

Definition at line 81 of file cache_inode_lookupp.c.