nfs-ganesha 1.4

cache_content_gc.c

Go to the documentation of this file.
00001 /*
00002  * vim:expandtab:shiftwidth=8:tabstop=8:
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 
00036 #ifdef HAVE_CONFIG_H
00037 #include "config.h"
00038 #endif
00039 
00040 #ifdef _SOLARIS
00041 #include "solaris_port.h"
00042 #endif                          /* _SOLARIS */
00043 
00044 #include "LRU_List.h"
00045 #include "log.h"
00046 #include "HashData.h"
00047 #include "HashTable.h"
00048 #include "fsal.h"
00049 #include "cache_inode.h"
00050 #include "cache_content.h"
00051 
00052 #include <unistd.h>
00053 #include <sys/types.h>
00054 #include <sys/param.h>
00055 #include <time.h>
00056 #include <pthread.h>
00057 #include <errno.h>
00058 
00059 #ifdef _LINUX
00060 #include <sys/vfs.h>            /* For statfs */
00061 #endif
00062 
00063 #ifdef _APPLE
00064 #include <sys/param.h>          /* For Statfs */
00065 #include <sys/mount.h>
00066 #endif
00067 
00068 cache_content_gc_policy_t cache_content_gc_policy;
00069 
00079 void cache_content_set_gc_policy(cache_content_gc_policy_t policy)
00080 {
00081   cache_content_gc_policy = policy;
00082 }                               /* cache_content_set_gc_policy */
00083 
00091 cache_content_gc_policy_t cache_content_get_gc_policy(void)
00092 {
00093   return cache_content_gc_policy;
00094 }                               /* cache_content_get_gc_policy */