nfs-ganesha 1.4
|
Removes an entry of any type. 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_inode_status_t | cache_inode_is_dir_empty (cache_entry_t *entry) |
Checks if a directory is empty without a lock. | |
cache_inode_status_t | cache_inode_is_dir_empty_WithLock (cache_entry_t *entry) |
Checks if a directory is empty, acquiring lock. | |
cache_inode_status_t | cache_inode_clean_internal (cache_entry_t *entry) |
Clean resources associated with entry. | |
cache_inode_status_t | cache_inode_remove (cache_entry_t *entry, fsal_name_t *name, fsal_attrib_list_t *attr, fsal_op_context_t *context, cache_inode_status_t *status) |
Public function to remove a name from a directory. | |
cache_inode_status_t | cache_inode_remove_impl (cache_entry_t *entry, fsal_name_t *name, fsal_op_context_t *context, cache_inode_status_t *status, uint32_t flags) |
Implement actual work of removing file. |
Removes an entry of any type.
Definition in file cache_inode_remove.c.
cache_inode_status_t cache_inode_clean_internal | ( | cache_entry_t * | entry | ) |
Clean resources associated with entry.
This function frees the various resources associated wiith a cache entry.
[in] | entry | Entry to be cleaned |
Definition at line 106 of file cache_inode_remove.c.
cache_inode_status_t cache_inode_is_dir_empty | ( | cache_entry_t * | entry | ) |
Checks if a directory is empty without a lock.
This function checks if the supplied directory is empty. The caller must hold the content lock.
[in] | entry | Entry to be checked (should be of type DIRECTORY) |
CACHE_INODE_SUCCESS | is directory is empty |
CACHE_INODE_BAD_TYPE | is pentry is not of type DIRECTORY |
CACHE_INODE_DIR_NOT_EMPTY | if pentry is not empty |
Definition at line 51 of file cache_inode_remove.c.
cache_inode_status_t cache_inode_is_dir_empty_WithLock | ( | cache_entry_t * | entry | ) |
Checks if a directory is empty, acquiring lock.
This function checks if the supplied cache entry represents an empty directory. This function acquires the content lock, which must not be held by the caller.
[in] | entry | Entry to be checked (should be of type DIRECTORY) |
CACHE_INODE_SUCCESS | is directory is empty |
CACHE_INODE_BAD_TYPE | is pentry is not of type DIRECTORY |
CACHE_INODE_DIR_NOT_EMPTY | if pentry is not empty |
Definition at line 84 of file cache_inode_remove.c.
cache_inode_status_t cache_inode_remove | ( | cache_entry_t * | entry, |
fsal_name_t * | name, | ||
fsal_attrib_list_t * | attr, | ||
fsal_op_context_t * | context, | ||
cache_inode_status_t * | status | ||
) |
Public function to remove a name from a directory.
Removes a name from the supplied directory. The caller should hold no locks on the directory.
[in] | entry | Entry for the parent directory to be managed |
[in] | name | Name to be removed |
[out] | attr | Attributes of the directory on success |
[in] | context | FSAL credentials |
[out] | status | Returned status |
CACHE_INODE_SUCCESS | if operation is a success |
Definition at line 164 of file cache_inode_remove.c.
cache_inode_status_t cache_inode_remove_impl | ( | cache_entry_t * | entry, |
fsal_name_t * | name, | ||
fsal_op_context_t * | context, | ||
cache_inode_status_t * | status, | ||
uint32_t | flags | ||
) |
Implement actual work of removing file.
Actually remove an entry from the directory. Assume that the directory contents and attributes are locked for writes. The attribute lock is released unless keep_md_lock is TRUE.
[in] | entry | Entry for the parent directory to be managed. |
[in] | name | Name of the entry that we are looking for in the cache. |
[in] | context | FSAL credentials |
[in] | status | Returned status |
[in] | flags | Flags to control lock retention |
Definition at line 231 of file cache_inode_remove.c.