nfs-ganesha 1.4
Functions

cache_content_rdwr.c File Reference

Management of the file content cache: read/write operations. More...

#include "fsal.h"
#include "LRU_List.h"
#include "log.h"
#include "HashData.h"
#include "HashTable.h"
#include "cache_inode.h"
#include "cache_content.h"
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/param.h>
#include <time.h>
#include <pthread.h>

Go to the source code of this file.

Functions

cache_content_status_t cache_content_open (cache_content_entry_t *pentry, cache_content_client_t *pclient, cache_content_status_t *pstatus)
cache_content_status_t cache_content_close (cache_content_entry_t *pentry, cache_content_client_t *pclient, cache_content_status_t *pstatus)
cache_content_status_t cache_content_rdwr (cache_content_entry_t *pentry, cache_inode_io_direction_t read_or_write, uint64_t offset, size_t *pio_size_in, size_t *pio_size_out, void *buffer, fsal_boolean_t *p_fsal_eof, struct stat *pbuffstat, cache_content_client_t *pclient, fsal_op_context_t *pcontext, cache_content_status_t *pstatus)

Detailed Description

Management of the file content cache: read/write operations.

Author:
Author:
deniel
Date:
Date:
2005/11/28 17:02:33
Version:
Revision:
1.12

cache_content_rdwr.c.c : Management of the file content cache, read and write operations.

Definition in file cache_content_rdwr.c.


Function Documentation

cache_content_status_t cache_content_close ( cache_content_entry_t pentry,
cache_content_client_t pclient,
cache_content_status_t pstatus 
)

cache_content_close: closes the local fd on the cache.

Closes the local fd on the cache.

No lock management is done in this layer: the related pentry in the cache inode layer is locked and will prevent from concurent accesses.

Parameters:
pentry[IN] entry in file content layer whose content is to be accessed.
pclient[IN] ressource allocated by the client for the nfs management. [OUT] returned status.
Returns:
CACHE_CONTENT_SUCCESS is successful .

Definition at line 152 of file cache_content_rdwr.c.

cache_content_status_t cache_content_open ( cache_content_entry_t pentry,
cache_content_client_t pclient,
cache_content_status_t pstatus 
)

cache_content_open: opens the local fd on the cache.

Opens the local fd on the cache.

No lock management is done in this layer: the related pentry in the cache inode layer is locked and will prevent from concurent accesses.

Parameters:
pentry[IN] entry in file content layer whose content is to be accessed.
pclient[IN] ressource allocated by the client for the nfs management. [OUT] returned status.
Returns:
CACHE_CONTENT_SUCCESS is successful .

Definition at line 81 of file cache_content_rdwr.c.

cache_content_status_t cache_content_rdwr ( cache_content_entry_t pentry,
cache_inode_io_direction_t  read_or_write,
uint64_t  offset,
size_t *  pio_size_in,
size_t *  pio_size_out,
void *  buffer,
fsal_boolean_t p_fsal_eof,
struct stat *  pbuffstat,
cache_content_client_t pclient,
fsal_op_context_t pcontext,
cache_content_status_t pstatus 
)

cache_content_rdwr: Reads/Writes through the cache layer.

Reads/Writes through the cache layer. This routine should be called only from the cache_inode layer.

No lock management is done in this layer: the related pentry in the cache inode layer is locked and will prevent from concurent accesses.

Parameters:
pentry[IN] entry in file content layer whose content is to be accessed.
read_or_write[IN] a flag of type cache_content_io_direction_t to tell if a read or write is to be done.
offset[IN] absolute position (in the FSAL file) where the IO will be done.
pio_size_in[IN] requested io size
pio_size_out[OUT] the size of the io that was successfully made.
pbuffstat[OUT] the 'stat' of entry in the data cache after the operation
bufferwrite:[IN] read:[OUT] the buffer for the data.
pclient[IN] ressource allocated by the client for the nfs management.
pcontext[IN] fsal credentials for the operation. [OUT] returned status.
Returns:
CACHE_CONTENT_SUCCESS is successful .

Definition at line 203 of file cache_content_rdwr.c.