nfs-ganesha 1.4
Functions

cache_inode_rename.c File Reference

Renames an entry. More...

#include "LRU_List.h"
#include "log.h"
#include "HashData.h"
#include "HashTable.h"
#include "fsal.h"
#include "cache_inode.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_inode_status_t cache_inode_rename_cached_dirent (cache_entry_t *parent, fsal_name_t *oldname, fsal_name_t *newname, cache_inode_status_t *status)
 Renames an entry in the same directory.
cache_inode_status_t cache_inode_rename (cache_entry_t *dir_src, fsal_name_t *oldname, cache_entry_t *dir_dest, fsal_name_t *newname, fsal_attrib_list_t *attr_src, fsal_attrib_list_t *attr_dest, fsal_op_context_t *context, cache_inode_status_t *status)
 Renames an entry.

Detailed Description

Renames an entry.

Author:
Author:
deniel
Date:
Date:
2005/11/28 17:02:27
Version:
Revision:
1.20

cache_inode_rename.c : Renames an entry.

Definition in file cache_inode_rename.c.


Function Documentation

cache_inode_status_t cache_inode_rename ( cache_entry_t dir_src,
fsal_name_t oldname,
cache_entry_t dir_dest,
fsal_name_t newname,
fsal_attrib_list_t attr_src,
fsal_attrib_list_t attr_dest,
fsal_op_context_t context,
cache_inode_status_t status 
)

Renames an entry.

This function calls the FSAL to rename a file, then mirrors the operation in the cache.

Parameters:
[in]dir_srcThe source directory
[in]oldnameThe current name of the file
[in]dir_destThe destination directory
[in]newnameThe name to be assigned to the object
[out]attr_srcSource directory attributes after operation
[out]pattr_destDestination directory attributes after operation
[in]contextFSAL credentials
[out]statusReturned status
Return values:
CACHE_INODE_SUCCESSif operation is a success.
CACHE_INODE_NOT_FOUNDif source object does not exist
CACHE_INODE_ENTRY_EXISTSon collision.
CACHE_INODE_BAD_TYPEif dir_src or dir_dest is not a directory.

Definition at line 185 of file cache_inode_rename.c.

cache_inode_status_t cache_inode_rename_cached_dirent ( cache_entry_t parent,
fsal_name_t oldname,
fsal_name_t newname,
cache_inode_status_t status 
)

Renames an entry in the same directory.

Renames an entry in the same directory.

Parameters:
[in,out]parentThe directory to be managed
[in]oldnameThe name of the entry to rename
[in]newnameThe new name for the entry
[out]statusreturned status.
Returns:
the same as *status

Definition at line 74 of file cache_inode_rename.c.