nfs-ganesha 1.4

fsal_compat.c

Go to the documentation of this file.
00001 /*
00002  * vim:expandtab:shiftwidth=8:tabstop=8:
00003  *
00004  * Copyright (C) 2010, The Linux Box Corporation
00005  * Contributor : Adam C. Emerson <aemerson@linuxbox.com>
00006  *
00007  * Some portions Copyright CEA/DAM/DIF  (2008)
00008  * contributeur : Philippe DENIEL   philippe.deniel@cea.fr
00009  *                Thomas LEIBOVICI  thomas.leibovici@cea.fr
00010  *
00011  *
00012  * This program is free software; you can redistribute it and/or
00013  * modify it under the terms of the GNU Lesser General Public
00014  * License as published by the Free Software Foundation; either
00015  * version 3 of the License, or (at your option) any later version.
00016  *
00017  * This program is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020  * Lesser General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU Lesser General Public
00023  * License along with this library; if not, write to the Free Software
00024  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00025  *
00026  * -------------
00027  */
00028 
00029 #ifdef HAVE_CONFIG_H
00030 #include "config.h"
00031 #endif
00032 
00033 #include "fsal.h"
00034 #include "fsal_types.h"
00035 #include "fsal_glue.h"
00036 #include "fsal_internal.h"
00037 #include "FSAL/common_methods.h"
00038 
00039 fsal_functions_t fsal_ceph_functions = {
00040   .fsal_access = CEPHFSAL_access,
00041   .fsal_getattrs = CEPHFSAL_getattrs,
00042   .fsal_setattrs = CEPHFSAL_setattrs,
00043   .fsal_buildexportcontext = CEPHFSAL_BuildExportContext,
00044   .fsal_cleanupexportcontext = CEPHFSAL_CleanUpExportContext,
00045   .fsal_initclientcontext = COMMON_InitClientContext,
00046   .fsal_getclientcontext = COMMON_GetClientContext,
00047   .fsal_create = CEPHFSAL_create,
00048   .fsal_mkdir = CEPHFSAL_mkdir,
00049   .fsal_link = CEPHFSAL_link,
00050   .fsal_mknode = CEPHFSAL_mknode,
00051   .fsal_opendir = CEPHFSAL_opendir,
00052   .fsal_readdir = CEPHFSAL_readdir,
00053   .fsal_closedir = CEPHFSAL_closedir,
00054   .fsal_open_by_name = CEPHFSAL_open_by_name,
00055   .fsal_open = CEPHFSAL_open,
00056   .fsal_read = CEPHFSAL_read,
00057   .fsal_write = CEPHFSAL_write,
00058   .fsal_commit = CEPHFSAL_commit,
00059   .fsal_close = CEPHFSAL_close,
00060   .fsal_open_by_fileid = COMMON_open_by_fileid,
00061   .fsal_close_by_fileid = COMMON_close_by_fileid,
00062   .fsal_dynamic_fsinfo = CEPHFSAL_dynamic_fsinfo,
00063   .fsal_init = CEPHFSAL_Init,
00064   .fsal_terminate = CEPHFSAL_terminate,
00065   .fsal_test_access = CEPHFSAL_test_access,
00066   .fsal_setattr_access = COMMON_setattr_access_notsupp,
00067   .fsal_rename_access = COMMON_rename_access,
00068   .fsal_create_access = COMMON_create_access,
00069   .fsal_unlink_access = COMMON_unlink_access,
00070   .fsal_link_access = COMMON_link_access,
00071   .fsal_merge_attrs = COMMON_merge_attrs,
00072   .fsal_lookup = CEPHFSAL_lookup,
00073   .fsal_lookuppath = CEPHFSAL_lookupPath,
00074   .fsal_lookupjunction = CEPHFSAL_lookupJunction,
00075   .fsal_cleanobjectresources = COMMON_CleanObjectResources,
00076   .fsal_set_quota = COMMON_set_quota_noquota,
00077   .fsal_get_quota = COMMON_get_quota_noquota,
00078   .fsal_check_quota = COMMON_check_quota,
00079   .fsal_rcp = CEPHFSAL_rcp,
00080   .fsal_rename = CEPHFSAL_rename,
00081   .fsal_get_stats = CEPHFSAL_get_stats,
00082   .fsal_readlink = CEPHFSAL_readlink,
00083   .fsal_symlink = CEPHFSAL_symlink,
00084   .fsal_handlecmp = CEPHFSAL_handlecmp,
00085   .fsal_handle_to_hashindex = CEPHFSAL_Handle_to_HashIndex,
00086   .fsal_handle_to_rbtindex = CEPHFSAL_Handle_to_RBTIndex,
00087   .fsal_handle_to_hash_both = NULL,
00088   .fsal_digesthandle = CEPHFSAL_DigestHandle,
00089   .fsal_expandhandle = CEPHFSAL_ExpandHandle,
00090   .fsal_setdefault_fsal_parameter = CEPHFSAL_SetDefault_FSAL_parameter,
00091   .fsal_setdefault_fs_common_parameter
00092   = CEPHFSAL_SetDefault_FS_common_parameter,
00093   .fsal_setdefault_fs_specific_parameter
00094   = CEPHFSAL_SetDefault_FS_specific_parameter,
00095   .fsal_load_fsal_parameter_from_conf
00096   = CEPHFSAL_load_FSAL_parameter_from_conf,
00097   .fsal_load_fs_common_parameter_from_conf
00098   = CEPHFSAL_load_FS_common_parameter_from_conf,
00099   .fsal_load_fs_specific_parameter_from_conf
00100   = CEPHFSAL_load_FS_specific_parameter_from_conf,
00101   .fsal_truncate = CEPHFSAL_truncate,
00102   .fsal_unlink = CEPHFSAL_unlink,
00103   .fsal_getfsname = CEPHFSAL_GetFSName,
00104   .fsal_getxattrattrs = CEPHFSAL_GetXAttrAttrs,
00105   .fsal_listxattrs = CEPHFSAL_ListXAttrs,
00106   .fsal_getxattrvaluebyid = CEPHFSAL_GetXAttrValueById,
00107   .fsal_getxattridbyname = CEPHFSAL_GetXAttrIdByName,
00108   .fsal_getxattrvaluebyname = CEPHFSAL_GetXAttrValueByName,
00109   .fsal_setxattrvalue = CEPHFSAL_SetXAttrValue,
00110   .fsal_setxattrvaluebyid = CEPHFSAL_SetXAttrValueById,
00111   .fsal_removexattrbyid = CEPHFSAL_RemoveXAttrById,
00112   .fsal_removexattrbyname = CEPHFSAL_RemoveXAttrByName,
00113   .fsal_getextattrs = CEPHFSAL_getextattrs,
00114   .fsal_getfileno = CEPHFSAL_GetFileno,
00115   .fsal_share_op = COMMON_share_op_notsupp
00116 };
00117 
00118 fsal_const_t fsal_ceph_consts = {
00119   .fsal_handle_t_size = sizeof(cephfsal_handle_t),
00120   .fsal_op_context_t_size = sizeof(cephfsal_op_context_t),
00121   .fsal_export_context_t_size = sizeof(cephfsal_export_context_t),
00122   .fsal_file_t_size = sizeof(cephfsal_file_t),
00123   .fsal_cookie_t_size = sizeof(cephfsal_cookie_t),
00124   .fsal_cred_t_size = sizeof(struct user_credentials),
00125   .fs_specific_initinfo_t_size = sizeof(cephfs_specific_initinfo_t),
00126   .fsal_dir_t_size = sizeof(cephfsal_dir_t)
00127 };
00128 
00129 fsal_functions_t FSAL_GetFunctions(void)
00130 {
00131   return fsal_ceph_functions;
00132 } /* FSAL_GetFunctions */
00133 
00134 fsal_const_t FSAL_GetConsts(void)
00135 {
00136   return fsal_ceph_consts;
00137 }                               /* FSAL_GetConsts */