nfs-ganesha 1.4
Functions

fsal_xattrs.c File Reference

#include "fsal.h"
#include "fsal_internal.h"
#include "fsal_convert.h"
#include <string.h>
#include <alloca.h>
#include <fcntl.h>

Go to the source code of this file.

Functions

fsal_status_t CEPHFSAL_GetXAttrAttrs (fsal_handle_t *exthandle, fsal_op_context_t *extcontext, unsigned int xattr_id, fsal_attrib_list_t *attrs)
fsal_status_t CEPHFSAL_ListXAttrs (fsal_handle_t *exthandle, unsigned int cookie, fsal_op_context_t *extcontext, fsal_xattrent_t *xattrs_tab, unsigned int xattrs_tabsize, unsigned int *p_nb_returned, int *end_of_list)
fsal_status_t CEPHFSAL_GetXAttrValueById (fsal_handle_t *exthandle, unsigned int xattr_id, fsal_op_context_t *extcontext, caddr_t buffer_addr, size_t buffer_size, size_t *p_output_size)
fsal_status_t CEPHFSAL_GetXAttrIdByName (fsal_handle_t *exthandle, const fsal_name_t *xattr_name, fsal_op_context_t *extcontext, unsigned int *pxattr_id)
fsal_status_t CEPHFSAL_GetXAttrValueByName (fsal_handle_t *exthandle, const fsal_name_t *xattr_name, fsal_op_context_t *extcontext, caddr_t buffer_addr, size_t buffer_size, size_t *p_output_size)
fsal_status_t CEPHFSAL_SetXAttrValue (fsal_handle_t *exthandle, const fsal_name_t *xattr_name, fsal_op_context_t *extcontext, caddr_t buffer_addr, size_t buffer_size, int create)
fsal_status_t CEPHFSAL_SetXAttrValueById (fsal_handle_t *exthandle, unsigned int xattr_id, fsal_op_context_t *extcontext, caddr_t buffer_addr, size_t buffer_size)
fsal_status_t CEPHFSAL_RemoveXAttrById (fsal_handle_t *exthandle, fsal_op_context_t *extcontext, unsigned int xattr_id)
fsal_status_t CEPHFSAL_RemoveXAttrByName (fsal_handle_t *exthandle, fsal_op_context_t *extcontext, const fsal_name_t *xattr_name)

Function Documentation

fsal_status_t CEPHFSAL_GetXAttrAttrs ( fsal_handle_t exthandle,
fsal_op_context_t extcontext,
unsigned int  xattr_id,
fsal_attrib_list_t 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.

Definition at line 53 of file FSAL_CEPH/fsal_xattrs.c.

fsal_status_t CEPHFSAL_GetXAttrIdByName ( fsal_handle_t exthandle,
const fsal_name_t xattr_name,
fsal_op_context_t extcontext,
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 263 of file FSAL_CEPH/fsal_xattrs.c.

fsal_status_t CEPHFSAL_GetXAttrValueById ( fsal_handle_t exthandle,
unsigned int  xattr_id,
fsal_op_context_t extcontext,
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 225 of file FSAL_CEPH/fsal_xattrs.c.

fsal_status_t CEPHFSAL_GetXAttrValueByName ( fsal_handle_t exthandle,
const fsal_name_t xattr_name,
fsal_op_context_t extcontext,
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 303 of file FSAL_CEPH/fsal_xattrs.c.

fsal_status_t CEPHFSAL_ListXAttrs ( fsal_handle_t exthandle,
unsigned int  cookie,
fsal_op_context_t extcontext,
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 138 of file FSAL_CEPH/fsal_xattrs.c.

fsal_status_t CEPHFSAL_RemoveXAttrById ( fsal_handle_t exthandle,
fsal_op_context_t extcontext,
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 388 of file FSAL_CEPH/fsal_xattrs.c.

fsal_status_t CEPHFSAL_RemoveXAttrByName ( fsal_handle_t exthandle,
fsal_op_context_t extcontext,
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 413 of file FSAL_CEPH/fsal_xattrs.c.

fsal_status_t CEPHFSAL_SetXAttrValue ( fsal_handle_t exthandle,
const fsal_name_t xattr_name,
fsal_op_context_t extcontext,
caddr_t  buffer_addr,
size_t  buffer_size,
int  create 
)

Definition at line 334 of file FSAL_CEPH/fsal_xattrs.c.

fsal_status_t CEPHFSAL_SetXAttrValueById ( fsal_handle_t exthandle,
unsigned int  xattr_id,
fsal_op_context_t extcontext,
caddr_t  buffer_addr,
size_t  buffer_size 
)

Definition at line 363 of file FSAL_CEPH/fsal_xattrs.c.