nfs-ganesha 1.4
Functions

fsal_lock.c File Reference

#include "fsal.h"
#include "fsal_internal.h"
#include "fsal_convert.h"

Go to the source code of this file.

Functions

fsal_status_t VFSFSAL_lock_op (fsal_file_t *p_file_descriptor, fsal_handle_t *p_filehandle, fsal_op_context_t *p_context, void *p_owner, fsal_lock_op_t lock_op, fsal_lock_param_t request_lock, fsal_lock_param_t *conflicting_lock)

Function Documentation

fsal_status_t VFSFSAL_lock_op ( fsal_file_t p_file_descriptor,
fsal_handle_t p_filehandle,
fsal_op_context_t p_context,
void *  p_owner,
fsal_lock_op_t  lock_op,
fsal_lock_param_t  request_lock,
fsal_lock_param_t conflicting_lock 
)

VFSFSAL_lock_op: Lock/unlock/test an owner independent (anonymous) lock for a region in a file.

Parameters:
p_file_descriptor(input): File descriptor of the file to lock.
p_filehandle(input): File handle of the file to lock.
p_context(input): Context
p_owner(input): Owner for the requested lock
lock_op(input): Can be either FSAL_OP_LOCKT, FSAL_OP_LOCK, FSAL_OP_UNLOCK. The operations are test if a file region is locked, lock a file region, unlock a file region.
lock_type(input): Can be either FSAL_LOCK_R, FSAL_LOCK_W. Either a read lock or write lock.
lock_start(input): Start of lock region measured as offset of bytes from start of file.
lock_length(input): Number of bytes to lock.
Returns:
Major error codes:
  • ERR_FSAL_NO_ERROR: no error.
  • ERR_FSAL_FAULT: One of the in put parameters is NULL.
  • ERR_FSAL_PERM: lock_op was FSAL_OP_LOCKT and the result was that the operation would not be possible.

Definition at line 62 of file FSAL_VFS/fsal_lock.c.