nfs-ganesha 1.4
|
00001 /* 00002 * 00003 * 00004 * Copyright CEA/DAM/DIF (2010) 00005 * contributeur : Philippe DENIEL philippe.deniel@cea.fr 00006 * Thomas LEIBOVICI thomas.leibovici@cea.fr 00007 * 00008 * 00009 * This program is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU Lesser General Public 00011 * License as published by the Free Software Foundation; either 00012 * version 3 of the License, or (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 * Lesser General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU Lesser General Public 00020 * License along with this library; if not, write to the Free Software 00021 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00022 * 00023 * --------------------------------------- 00024 */ 00025 00033 #ifndef _FSAL_GLUE_H 00034 #define _FSAL_GLUE_H 00035 00036 #include "fsal_types.h" 00037 #include "fsal_glue_const.h" 00038 00039 /* In the "static" case, original types are used, this is safer */ 00040 /* These declarations were part of the USE_SHARED_FSAL feature 00041 * which is now deprecated. Deprecate this file completely with 00042 * the new FSAL API change. In the meantime, leave it for 00043 * history reasons. 00044 */ 00045 #if 0 00046 00047 /* Allow aliasing of fsal_handle_t since FSALs will be 00048 * casting between pointer types 00049 */ 00050 typedef struct 00051 { 00052 char data[FSAL_HANDLE_T_SIZE]; 00053 } __attribute__((__may_alias__)) fsal_handle_t; 00054 00055 typedef fsal_handle_t fsal_handle_storage_t ; 00056 00057 /* NOTE: this structure is very dangerous as noted by the comments 00058 * in the individual fsal_types.h files. It harkens back to the 00059 * days of fortran commons... We let it go for now as we 00060 * refactor. The first element must be identical throughout! 00061 */ 00062 00063 typedef struct 00064 { 00065 fsal_staticfsinfo_t * fe_static_fs_info; 00066 00067 char fe_data[FSAL_EXPORT_CONTEXT_T_SIZE]; 00068 } fsal_export_context_t; 00069 00070 /* NOTE: this structure is very dangerous as noted by the comments 00071 * in the individual fsal_types.h files. It harkens back to the 00072 * days of fortran commons... We let it go for now as we 00073 * refactor. The first 2 elements must be identical throughout! 00074 */ 00075 00076 typedef struct 00077 { 00078 fsal_export_context_t *export_context; 00079 struct user_credentials credential; 00080 char data[FSAL_OP_CONTEXT_T_SIZE]; /* slightly bigger (for now) */ 00081 } fsal_op_context_t; 00082 00083 typedef struct 00084 { 00085 char data[FSAL_DIR_T_SIZE]; 00086 } fsal_dir_t; 00087 00088 typedef struct 00089 { 00090 char data[FSAL_FILE_T_SIZE]; 00091 } fsal_file_t; 00092 00093 typedef struct 00094 { 00095 char data[FSAL_COOKIE_T_SIZE]; 00096 } fsal_cookie_t; 00097 00098 typedef struct 00099 { 00100 char data[FSAL_CRED_T_SIZE]; 00101 } fsal_cred_t; 00102 00103 typedef struct 00104 { 00105 char data[FSAL_FS_SPECIFIC_INITINFO_T]; 00106 } fs_specific_initinfo_t; 00107 00108 #define FSAL_OP_CONTEXT_TO_UID( __pcontext ) ( __pcontext->credential.user ) 00109 00110 #endif 00111 00112 #endif /* _FSAL_GLUE_H */