nfs-ganesha 1.4
Functions

fsal_quota.c File Reference

#include "fsal.h"
#include "fsal_internal.h"
#include "fsal_convert.h"
#include <sys/quota.h>
#include <sys/types.h>
#include <string.h>

Go to the source code of this file.

Functions

fsal_status_t XFSFSAL_get_quota (fsal_path_t *pfsal_path, int quota_type, fsal_uid_t fsal_uid, fsal_quota_t *pquota)
fsal_status_t XFSFSAL_set_quota (fsal_path_t *pfsal_path, int quota_type, fsal_uid_t fsal_uid, fsal_quota_t *pquota, fsal_quota_t *presquota)
fsal_status_t XFSFSAL_check_quota (char *fs_spec, fsal_quota_type_t quota_type, fsal_uid_t fsal_uid)

Function Documentation

fsal_status_t XFSFSAL_check_quota ( char *  fs_spec,
fsal_quota_type_t  quota_type,
fsal_uid_t  fsal_uid 
)

FSAL_check_quota : checks if quotas allow a user to do an operation

Parameters:
fs_specpath to the filesystem whose quota are requested
quota_typetype of quota to be checked (inodes or blocks
fsal_uiduid for the user whose quota are requested
Returns:
Major error codes :
  • ERR_FSAL_NO_ERROR (no error)
  • Another error code if an error occured.

Definition at line 194 of file FSAL_XFS/fsal_quota.c.

fsal_status_t XFSFSAL_get_quota ( fsal_path_t pfsal_path,
int  quota_type,
fsal_uid_t  fsal_uid,
fsal_quota_t pquota 
)

FSAL_get_quota : Gets the quota for a given path.

Parameters:
pfsal_pathpath to the filesystem whose quota are requested
quota_typethe kind of requested quota (user or group)
fsal_uiduid for the user whose quota are requested
pquota(input): Parameter to the structure containing the requested quotas
Returns:
Major error codes :
  • ERR_FSAL_NO_ERROR (no error)
  • Another error code if an error occured.

Definition at line 60 of file FSAL_XFS/fsal_quota.c.

fsal_status_t XFSFSAL_set_quota ( fsal_path_t pfsal_path,
int  quota_type,
fsal_uid_t  fsal_uid,
fsal_quota_t pquota,
fsal_quota_t presquota 
)

FSAL_get_quota : Gets the quota for a given path.

Parameters:
pfsal_pathpath to the filesystem whose quota are requested
quota_typethe kind of requested quota (user or group)
fsal_uiduid for the user whose quota are requested
pquota(input): pointer to the structure containing the wanted quotas
presquot(output) pointer to the structure containing the resulting quotas
Returns:
Major error codes :
  • ERR_FSAL_NO_ERROR (no error)
  • Another error code if an error occured.

Definition at line 113 of file FSAL_XFS/fsal_quota.c.