nfs-ganesha 1.4
Functions | Variables

mfsl_async_truncate.c File Reference

#include "fsal_types.h"
#include "fsal.h"
#include "mfsl_types.h"
#include "mfsl.h"
#include "common_utils.h"

Go to the source code of this file.

Functions

fsal_status_t MFSL_truncate_async_op (mfsl_async_op_desc_t *popasyncdesc)
fsal_status_t MFSAL_truncate_check_perms (mfsl_object_t *filehandle, mfsl_object_specific_data_t *pspecdata, fsal_op_context_t *p_context, mfsl_context_t *p_mfsl_context)
fsal_status_t MFSL_truncate (mfsl_object_t *filehandle, fsal_op_context_t *p_context, mfsl_context_t *p_mfsl_context, fsal_size_t length, fsal_file_t *file_descriptor, fsal_attrib_list_t *object_attributes)

Variables

mfsl_parameter_t mfsl_param

Function Documentation

fsal_status_t MFSAL_truncate_check_perms ( mfsl_object_t filehandle,
mfsl_object_specific_data_t pspecdata,
fsal_op_context_t p_context,
mfsl_context_t p_mfsl_context 
)

MFSAL_truncate_check_perms : Checks authorization to perform an asynchronous truncate.

Checks authorization to perform an asynchronous truncate.

Parameters:
filehandle[IN] mfsl object to be operated on.
pspecdata[INOUT] mfsl object associated specific data
p_context[IN] associated fsal context
p_mfsl_context[INOUT] associated mfsl context
attrib_set[IN] attributes to be set
Returns:
always FSAL_NO_ERROR (not yet implemented

Definition at line 88 of file mfsl_async_truncate.c.

fsal_status_t MFSL_truncate ( mfsl_object_t filehandle,
fsal_op_context_t p_context,
mfsl_context_t p_mfsl_context,
fsal_size_t  length,
fsal_file_t file_descriptor,
fsal_attrib_list_t object_attributes 
)

MFSL_truncate : posts an asynchronous truncate and sets the cached attributes in return.

Posts an asynchronous truncate and sets the cached attributes in return. If the object is not asynchronous, then the content of object attributes will be used to populate it.

Parameters:
filehandle[IN] mfsl object to be operated on.
p_context[IN] associated fsal context
p_mfsl_context[INOUT] associated mfsl context
size[IN] new size
file_descriptor[UNUSED] should be removed as stateful FSAL_truncate is removed from FSAL_PROXY
object_attributes[INOUT] resulting attributes
Returns:
the same as FSAL_truncate

Todo:
: there may be a coefficient to be applied here

Definition at line 119 of file mfsl_async_truncate.c.

fsal_status_t MFSL_truncate_async_op ( mfsl_async_op_desc_t popasyncdesc)

MFSL_truncate_async_op: Callback for asynchronous truncate.

Callback for asynchronous truncate.

Parameters:
popasyncdes[INOUT] asynchronous operation descriptor
Returns:
the status of the performed FSAL_truncate.

Definition at line 59 of file mfsl_async_truncate.c.


Variable Documentation

Definition at line 58 of file mfsl_async_init.c.