nfs-ganesha 1.4
Classes | Defines | Typedefs | Functions

fsal_xattrs.c File Reference

#include "fsal.h"
#include "fsal_internal.h"
#include "fsal_convert.h"
#include "HPSSclapiExt/hpssclapiext.h"
#include <hpss_uuid.h>
#include <hpss_errno.h>
#include <hpss_limits.h>

Go to the source code of this file.

Classes

struct  fsal_xattr_def__

Defines

#define XATTR_FOR_FILE   0x00000001
#define XATTR_FOR_DIR   0x00000002
#define XATTR_FOR_SYMLINK   0x00000004
#define XATTR_FOR_ALL   0x0000000F
#define XATTR_RO   0x00000100
#define XATTR_RW   0x00000200
#define XATTR_COUNT   5

Typedefs

typedef int(* xattr_getfunc_t )(hpssfsal_handle_t *, hpssfsal_op_context_t *, caddr_t, size_t, size_t *)
typedef int(* xattr_setfunc_t )(hpssfsal_handle_t *, hpssfsal_op_context_t *, caddr_t, size_t, int)
typedef int(* xattr_printfunc_t )(caddr_t, size_t, caddr_t, size_t *)
typedef struct fsal_xattr_def__ fsal_xattr_def_t

Functions

int get_file_cos (hpssfsal_handle_t *p_objecthandle, hpssfsal_op_context_t *p_context, caddr_t buffer_addr, size_t buffer_size, size_t *p_output_size)
int print_file_cos (caddr_t InBuff, size_t InSize, caddr_t OutBuff, size_t *pOutSize)
int get_file_slevel (hpssfsal_handle_t *p_objecthandle, hpssfsal_op_context_t *p_context, caddr_t buffer_addr, size_t buffer_size, size_t *p_output_size)
int print_ns_handle (caddr_t InBuff, size_t InSize, caddr_t OutBuff, size_t *pOutSize)
int get_ns_handle (hpssfsal_handle_t *p_objecthandle, hpssfsal_op_context_t *p_context, caddr_t buffer_addr, size_t buffer_size, size_t *p_output_size)
int get_obj_type (hpssfsal_handle_t *p_objecthandle, hpssfsal_op_context_t *p_context, caddr_t buffer_addr, size_t buffer_size, size_t *p_output_size)
int get_bfid (hpssfsal_handle_t *p_objecthandle, hpssfsal_op_context_t *p_context, caddr_t buffer_addr, size_t buffer_size, size_t *p_output_size)
fsal_status_t HPSSFSAL_GetXAttrAttrs (hpssfsal_handle_t *p_objecthandle, hpssfsal_op_context_t *p_context, unsigned int xattr_id, fsal_attrib_list_t *p_attrs)
fsal_status_t HPSSFSAL_ListXAttrs (hpssfsal_handle_t *p_objecthandle, unsigned int argcookie, hpssfsal_op_context_t *p_context, fsal_xattrent_t *xattrs_tab, unsigned int xattrs_tabsize, unsigned int *p_nb_returned, int *end_of_list)
fsal_status_t HPSSFSAL_GetXAttrValueById (hpssfsal_handle_t *p_objecthandle, unsigned int xattr_id, hpssfsal_op_context_t *p_context, caddr_t buffer_addr, size_t buffer_size, size_t *p_output_size)
fsal_status_t HPSSFSAL_GetXAttrIdByName (hpssfsal_handle_t *p_objecthandle, const fsal_name_t *xattr_name, hpssfsal_op_context_t *p_context, unsigned int *pxattr_id)
fsal_status_t HPSSFSAL_GetXAttrValueByName (hpssfsal_handle_t *p_objecthandle, const fsal_name_t *xattr_name, hpssfsal_op_context_t *p_context, caddr_t buffer_addr, size_t buffer_size, size_t *p_output_size)
fsal_status_t HPSSFSAL_SetXAttrValue (hpssfsal_handle_t *p_objecthandle, const fsal_name_t *xattr_name, hpssfsal_op_context_t *p_context, caddr_t buffer_addr, size_t buffer_size, int create)
fsal_status_t HPSSFSAL_SetXAttrValueById (hpssfsal_handle_t *p_objecthandle, unsigned int xattr_id, hpssfsal_op_context_t *p_context, caddr_t buffer_addr, size_t buffer_size)
fsal_status_t HPSSFSAL_RemoveXAttrById (hpssfsal_handle_t *p_objecthandle, hpssfsal_op_context_t *p_context, unsigned int xattr_id)
fsal_status_t HPSSFSAL_RemoveXAttrByName (hpssfsal_handle_t *p_objecthandle, hpssfsal_op_context_t *p_context, const fsal_name_t *xattr_name)
int HPSSFSAL_GetXattrOffsetSetable (void)

Define Documentation

#define XATTR_COUNT   5

Definition at line 332 of file FSAL_HPSS/fsal_xattrs.c.

#define XATTR_FOR_ALL   0x0000000F

Definition at line 31 of file FSAL_HPSS/fsal_xattrs.c.

#define XATTR_FOR_DIR   0x00000002

Definition at line 29 of file FSAL_HPSS/fsal_xattrs.c.

#define XATTR_FOR_FILE   0x00000001

Definition at line 28 of file FSAL_HPSS/fsal_xattrs.c.

#define XATTR_FOR_SYMLINK   0x00000004

Definition at line 30 of file FSAL_HPSS/fsal_xattrs.c.

#define XATTR_RO   0x00000100

Definition at line 32 of file FSAL_HPSS/fsal_xattrs.c.

#define XATTR_RW   0x00000200

Definition at line 33 of file FSAL_HPSS/fsal_xattrs.c.


Typedef Documentation

typedef int(* xattr_getfunc_t)(hpssfsal_handle_t *,hpssfsal_op_context_t *,caddr_t,size_t,size_t *)

Definition at line 37 of file FSAL_HPSS/fsal_xattrs.c.

typedef int(* xattr_printfunc_t)(caddr_t,size_t,caddr_t,size_t *)

Definition at line 49 of file FSAL_HPSS/fsal_xattrs.c.

typedef int(* xattr_setfunc_t)(hpssfsal_handle_t *,hpssfsal_op_context_t *,caddr_t,size_t,int)

Definition at line 43 of file FSAL_HPSS/fsal_xattrs.c.


Function Documentation

int get_bfid ( hpssfsal_handle_t p_objecthandle,
hpssfsal_op_context_t p_context,
caddr_t  buffer_addr,
size_t  buffer_size,
size_t *  p_output_size 
)

Definition at line 284 of file FSAL_HPSS/fsal_xattrs.c.

int get_file_cos ( hpssfsal_handle_t p_objecthandle,
hpssfsal_op_context_t p_context,
caddr_t  buffer_addr,
size_t  buffer_size,
size_t *  p_output_size 
)

Definition at line 68 of file FSAL_HPSS/fsal_xattrs.c.

int get_file_slevel ( hpssfsal_handle_t p_objecthandle,
hpssfsal_op_context_t p_context,
caddr_t  buffer_addr,
size_t  buffer_size,
size_t *  p_output_size 
)

Definition at line 123 of file FSAL_HPSS/fsal_xattrs.c.

int get_ns_handle ( hpssfsal_handle_t p_objecthandle,
hpssfsal_op_context_t p_context,
caddr_t  buffer_addr,
size_t  buffer_size,
size_t *  p_output_size 
)

Definition at line 227 of file FSAL_HPSS/fsal_xattrs.c.

int get_obj_type ( hpssfsal_handle_t p_objecthandle,
hpssfsal_op_context_t p_context,
caddr_t  buffer_addr,
size_t  buffer_size,
size_t *  p_output_size 
)

Definition at line 250 of file FSAL_HPSS/fsal_xattrs.c.

fsal_status_t HPSSFSAL_GetXAttrAttrs ( hpssfsal_handle_t p_objecthandle,
hpssfsal_op_context_t p_context,
unsigned int  xattr_id,
fsal_attrib_list_t p_attrs 
)

Get the attributes of an extended attribute from its index.

Parameters:
p_objecthandleHandle of the object you want to get attribute for.
p_contextpointer to the current security context.
xattr_cookiexattr's cookie (as returned by listxattrs).
p_attrsxattr's attributes.
Parameters:
p_attrsIN/OUT xattr attributes (if supported)

Definition at line 508 of file FSAL_HPSS/fsal_xattrs.c.

fsal_status_t HPSSFSAL_GetXAttrIdByName ( hpssfsal_handle_t p_objecthandle,
const fsal_name_t xattr_name,
hpssfsal_op_context_t p_context,
unsigned int *  pxattr_id 
)

Get the index of an xattr based on its name

Parameters:
p_objecthandleHandle of the object you want to get attribute for.
xattr_namethe name of the attribute to be read.
pxattr_idfound xattr_id
Returns:
ERR_FSAL_NO_ERROR if xattr_name exists, ERR_FSAL_NOENT otherwise

Definition at line 880 of file FSAL_HPSS/fsal_xattrs.c.

int HPSSFSAL_GetXattrOffsetSetable ( void  )

Definition at line 1210 of file FSAL_HPSS/fsal_xattrs.c.

fsal_status_t HPSSFSAL_GetXAttrValueById ( hpssfsal_handle_t p_objecthandle,
unsigned int  xattr_id,
hpssfsal_op_context_t p_context,
caddr_t  buffer_addr,
size_t  buffer_size,
size_t *  p_output_size 
)

Get the value of an extended attribute from its index.

Parameters:
p_objecthandleHandle of the object you want to get attribute for.
xattr_namethe name of the attribute to be read.
p_contextpointer to the current security context.
buffer_addraddress of the buffer where the xattr value is to be stored.
buffer_sizesize of the buffer where the xattr value is to be stored.
p_output_sizesize of the data actually stored into the buffer.

Definition at line 787 of file FSAL_HPSS/fsal_xattrs.c.

fsal_status_t HPSSFSAL_GetXAttrValueByName ( hpssfsal_handle_t p_objecthandle,
const fsal_name_t xattr_name,
hpssfsal_op_context_t p_context,
caddr_t  buffer_addr,
size_t  buffer_size,
size_t *  p_output_size 
)

Get the value of an extended attribute from its name.

Parameters:
p_objecthandleHandle of the object you want to get attribute for.
xattr_namethe name of the attribute to be read.
p_contextpointer to the current security context.
buffer_addraddress of the buffer where the xattr value is to be stored.
buffer_sizesize of the buffer where the xattr value is to be stored.
p_output_sizesize of the data actually stored into the buffer.

Definition at line 971 of file FSAL_HPSS/fsal_xattrs.c.

fsal_status_t HPSSFSAL_ListXAttrs ( hpssfsal_handle_t p_objecthandle,
unsigned int  argcookie,
hpssfsal_op_context_t p_context,
fsal_xattrent_t xattrs_tab,
unsigned int  xattrs_tabsize,
unsigned int *  p_nb_returned,
int *  end_of_list 
)

Retrieves the list of extended attributes for an object in the filesystem.

Parameters:
p_objecthandleHandle of the object we want to get extended attributes.
cookieindex of the next entry to be returned.
p_contextpointer to the current security context.
xattrs_taba table for storing extended attributes list to.
xattrs_tabsizethe maximum number of xattr entries that xattrs_tab can contain.
p_nb_returnedthe number of xattr entries actually stored in xattrs_tab.
end_of_listthis boolean indicates that the end of xattrs list has been reached.

Definition at line 615 of file FSAL_HPSS/fsal_xattrs.c.

fsal_status_t HPSSFSAL_RemoveXAttrById ( hpssfsal_handle_t p_objecthandle,
hpssfsal_op_context_t p_context,
unsigned int  xattr_id 
)

Removes a xattr by Id

Parameters:
p_objecthandleHandle of the object you want to get attribute for.
p_contextpointer to the current security context.
xattr_idxattr's id

Definition at line 1189 of file FSAL_HPSS/fsal_xattrs.c.

fsal_status_t HPSSFSAL_RemoveXAttrByName ( hpssfsal_handle_t p_objecthandle,
hpssfsal_op_context_t p_context,
const fsal_name_t xattr_name 
)

Removes a xattr by Name

Parameters:
p_objecthandleHandle of the object you want to get attribute for.
p_contextpointer to the current security context.
xattr_namexattr's name

Definition at line 1203 of file FSAL_HPSS/fsal_xattrs.c.

fsal_status_t HPSSFSAL_SetXAttrValue ( hpssfsal_handle_t p_objecthandle,
const fsal_name_t xattr_name,
hpssfsal_op_context_t p_context,
caddr_t  buffer_addr,
size_t  buffer_size,
int  create 
)

Definition at line 1076 of file FSAL_HPSS/fsal_xattrs.c.

fsal_status_t HPSSFSAL_SetXAttrValueById ( hpssfsal_handle_t p_objecthandle,
unsigned int  xattr_id,
hpssfsal_op_context_t p_context,
caddr_t  buffer_addr,
size_t  buffer_size 
)

Definition at line 1119 of file FSAL_HPSS/fsal_xattrs.c.

int print_file_cos ( caddr_t  InBuff,
size_t  InSize,
caddr_t  OutBuff,
size_t *  pOutSize 
)

Definition at line 112 of file FSAL_HPSS/fsal_xattrs.c.

int print_ns_handle ( caddr_t  InBuff,
size_t  InSize,
caddr_t  OutBuff,
size_t *  pOutSize 
)

Definition at line 210 of file FSAL_HPSS/fsal_xattrs.c.