source: squid-ssl/trunk/fuentes/src/fs/Module.cc @ 5495

Last change on this file since 5495 was 5495, checked in by Juanma, 2 years ago

Initial release

File size: 1.5 KB
Line 
1/*
2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9#include "squid.h"
10#include "Module.h"
11#if defined(HAVE_FS_UFS) || defined(HAVE_FS_AUFS) || defined(HAVE_FS_DISKD)
12#include "fs/ufs/StoreFSufs.h"
13#include "fs/ufs/UFSSwapDir.h"
14#endif
15
16#if HAVE_FS_UFS
17static Fs::Ufs::StoreFSufs<Fs::Ufs::UFSSwapDir> *UfsInstance;
18#endif
19
20#if HAVE_FS_AUFS
21static Fs::Ufs::StoreFSufs<Fs::Ufs::UFSSwapDir> *AufsInstance;
22#endif
23
24#if HAVE_FS_DISKD
25static Fs::Ufs::StoreFSufs<Fs::Ufs::UFSSwapDir> *DiskdInstance;
26#endif
27
28#if HAVE_FS_ROCK
29#include "fs/rock/RockStoreFileSystem.h"
30static Rock::StoreFileSystem *RockInstance = NULL;
31#endif
32
33void Fs::Init()
34{
35
36#if HAVE_FS_UFS
37    UfsInstance = new Fs::Ufs::StoreFSufs<Fs::Ufs::UFSSwapDir>("Blocking", "ufs");
38#endif
39
40#if HAVE_FS_AUFS
41    AufsInstance = new Fs::Ufs::StoreFSufs<Fs::Ufs::UFSSwapDir>("DiskThreads", "aufs");;
42#endif
43
44#if HAVE_FS_DISKD
45    DiskdInstance = new Fs::Ufs::StoreFSufs<Fs::Ufs::UFSSwapDir>("DiskDaemon", "diskd");;
46#endif
47
48#if HAVE_FS_ROCK
49    RockInstance = new Rock::StoreFileSystem();
50#endif
51
52}
53
54void Fs::Clean()
55{
56#if HAVE_FS_UFS
57    delete UfsInstance;
58#endif
59
60#if HAVE_FS_AUFS
61    delete AufsInstance;
62#endif
63
64#if HAVE_FS_DISKD
65    delete DiskdInstance;
66#endif
67
68#if HAVE_FS_ROCK
69    delete RockInstance;
70#endif
71
72}
73
Note: See TracBrowser for help on using the repository browser.