nfs-ganesha 1.4
|
00001 /* 00002 * 00003 * 00004 * Copyright CEA/DAM/DIF (2008) 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 00037 #ifndef _CACHE_CONTENT_POLICY_H 00038 #define _CACHE_CONTENT_POLICY_H 00039 00040 #include <unistd.h> 00041 #include <sys/types.h> 00042 #include <sys/param.h> 00043 #include <time.h> 00044 #include <pthread.h> 00045 00046 #include "LRU_List.h" 00047 #include "HashData.h" 00048 #include "HashTable.h" 00049 #include "fsal.h" 00050 #include "cache_inode.h" 00051 #include "cache_content.h" 00052 00053 typedef enum cache_content_caching_type__ 00054 { CACHE_CONTENT_NO_POLICY = 0, 00055 CACHE_CONTENT_NOT_CACHED = 1, 00056 CACHE_CONTENT_FULLY_CACHED = 2 00057 } cache_content_caching_type_t; 00058 00059 typedef struct cache_content_policy_data__ 00060 { 00061 unsigned int UseMaxCacheSize; 00062 uint64_t MaxCacheSize; 00063 } cache_content_policy_data_t; 00064 00065 cache_content_caching_type_t cache_content_cache_behaviour(cache_entry_t * pentry_inode, 00066 cache_content_policy_data_t * 00067 ppolicy_data, 00068 cache_content_client_t * 00069 pclient, 00070 cache_content_status_t * 00071 pstatus); 00072 00073 #endif /* _CACHE_CONTENT_POLICY_H */