nfs-ganesha 1.4

fsal_compat.c

Go to the documentation of this file.
00001 /*
00002  * vim:expandtab:shiftwidth=4:tabstop=4:
00003  */
00004 
00010 #ifdef HAVE_CONFIG_H
00011 #include "config.h"
00012 #endif
00013 
00014 #include "fsal.h"
00015 #include "fsal_glue.h"
00016 #include "fsal_internal.h"
00017 #include "FSAL/common_methods.h"
00018 
00019 fsal_functions_t fsal_vfs_functions = {
00020   .fsal_access = VFSFSAL_access,
00021   .fsal_getattrs = VFSFSAL_getattrs,
00022   .fsal_getattrs_descriptor = VFSFSAL_getattrs_descriptor,
00023   .fsal_setattrs = VFSFSAL_setattrs,
00024   .fsal_buildexportcontext = VFSFSAL_BuildExportContext,
00025   .fsal_cleanupexportcontext = COMMON_CleanUpExportContext_noerror,
00026   .fsal_initclientcontext = COMMON_InitClientContext,
00027   .fsal_getclientcontext = COMMON_GetClientContext,
00028   .fsal_create = VFSFSAL_create,
00029   .fsal_mkdir = VFSFSAL_mkdir,
00030   .fsal_link = VFSFSAL_link,
00031   .fsal_mknode = VFSFSAL_mknode,
00032   .fsal_opendir = VFSFSAL_opendir,
00033   .fsal_readdir = VFSFSAL_readdir,
00034   .fsal_closedir = VFSFSAL_closedir,
00035   .fsal_open_by_name = VFSFSAL_open_by_name,
00036   .fsal_open = VFSFSAL_open,
00037   .fsal_read = VFSFSAL_read,
00038   .fsal_write = VFSFSAL_write,
00039   .fsal_commit = VFSFSAL_commit,
00040   .fsal_close = VFSFSAL_close,
00041   .fsal_open_by_fileid = COMMON_open_by_fileid,
00042   .fsal_close_by_fileid = COMMON_close_by_fileid,
00043   .fsal_dynamic_fsinfo = VFSFSAL_dynamic_fsinfo,
00044   .fsal_init = VFSFSAL_Init,
00045   .fsal_terminate = COMMON_terminate_noerror,
00046   .fsal_test_access = VFSFSAL_test_access,
00047   .fsal_setattr_access = COMMON_setattr_access_notsupp,
00048   .fsal_rename_access = COMMON_rename_access,
00049   .fsal_create_access = COMMON_create_access,
00050   .fsal_unlink_access = COMMON_unlink_access,
00051   .fsal_link_access = COMMON_link_access,
00052   .fsal_merge_attrs = COMMON_merge_attrs,
00053   .fsal_lookup = VFSFSAL_lookup,
00054   .fsal_lookuppath = VFSFSAL_lookupPath,
00055   .fsal_lookupjunction = VFSFSAL_lookupJunction,
00056   .fsal_lock_op = VFSFSAL_lock_op,
00057   .fsal_cleanobjectresources = COMMON_CleanObjectResources,
00058   .fsal_set_quota = COMMON_set_quota_noquota,
00059   .fsal_get_quota = COMMON_get_quota_noquota,
00060   .fsal_check_quota = COMMON_check_quota,
00061   .fsal_rcp = VFSFSAL_rcp,
00062   .fsal_rename = VFSFSAL_rename,
00063   .fsal_get_stats = VFSFSAL_get_stats,
00064   .fsal_readlink = VFSFSAL_readlink,
00065   .fsal_symlink = VFSFSAL_symlink,
00066   .fsal_handlecmp = VFSFSAL_handlecmp,
00067   .fsal_handle_to_hashindex = VFSFSAL_Handle_to_HashIndex,
00068   .fsal_handle_to_rbtindex = VFSFSAL_Handle_to_RBTIndex,
00069   .fsal_handle_to_hash_both = NULL, 
00070   .fsal_digesthandle = VFSFSAL_DigestHandle,
00071   .fsal_expandhandle = VFSFSAL_ExpandHandle,
00072   .fsal_setdefault_fsal_parameter = COMMON_SetDefault_FSAL_parameter,
00073   .fsal_setdefault_fs_common_parameter = COMMON_SetDefault_FS_common_parameter,
00074   .fsal_setdefault_fs_specific_parameter = VFSFSAL_SetDefault_FS_specific_parameter,
00075   .fsal_load_fsal_parameter_from_conf = COMMON_load_FSAL_parameter_from_conf,
00076   .fsal_load_fs_common_parameter_from_conf =
00077       COMMON_load_FS_common_parameter_from_conf,
00078   .fsal_load_fs_specific_parameter_from_conf =
00079       VFSFSAL_load_FS_specific_parameter_from_conf,
00080   .fsal_truncate = VFSFSAL_truncate,
00081   .fsal_unlink = VFSFSAL_unlink,
00082   .fsal_getfsname = VFSFSAL_GetFSName,
00083   .fsal_getxattrattrs = VFSFSAL_GetXAttrAttrs,
00084   .fsal_listxattrs = VFSFSAL_ListXAttrs,
00085   .fsal_getxattrvaluebyid = VFSFSAL_GetXAttrValueById,
00086   .fsal_getxattridbyname = VFSFSAL_GetXAttrIdByName,
00087   .fsal_getxattrvaluebyname = VFSFSAL_GetXAttrValueByName,
00088   .fsal_setxattrvalue = VFSFSAL_SetXAttrValue,
00089   .fsal_setxattrvaluebyid = VFSFSAL_SetXAttrValueById,
00090   .fsal_removexattrbyid = VFSFSAL_RemoveXAttrById,
00091   .fsal_removexattrbyname = VFSFSAL_RemoveXAttrByName,
00092   .fsal_getextattrs = COMMON_getextattrs_notsupp,
00093   .fsal_getfileno = VFSFSAL_GetFileno,
00094   .fsal_share_op = COMMON_share_op_notsupp
00095 };
00096 
00097 fsal_const_t fsal_vfs_consts = {
00098   .fsal_handle_t_size = sizeof(vfsfsal_handle_t),
00099   .fsal_op_context_t_size = sizeof(vfsfsal_op_context_t),
00100   .fsal_export_context_t_size = sizeof(vfsfsal_export_context_t),
00101   .fsal_file_t_size = sizeof(vfsfsal_file_t),
00102   .fsal_cookie_t_size = sizeof(vfsfsal_cookie_t),
00103   .fsal_cred_t_size = sizeof(struct user_credentials),
00104   .fs_specific_initinfo_t_size = sizeof(vfsfs_specific_initinfo_t),
00105   .fsal_dir_t_size = sizeof(vfsfsal_dir_t)
00106 };
00107 
00108 fsal_functions_t FSAL_GetFunctions(void)
00109 {
00110   return fsal_vfs_functions;
00111 }                               /* FSAL_GetFunctions */
00112 
00113 fsal_const_t FSAL_GetConsts(void)
00114 {
00115   return fsal_vfs_consts;
00116 }                               /* FSAL_GetConsts */