]> git.ipfire.org Git - thirdparty/squid.git/blob - src/fs/Module.cc
Docs: Copyright updates for 2018 (#114)
[thirdparty/squid.git] / src / fs / Module.cc
1 /*
2 * Copyright (C) 1996-2018 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
17 static Fs::Ufs::StoreFSufs<Fs::Ufs::UFSSwapDir> *UfsInstance;
18 #endif
19
20 #if HAVE_FS_AUFS
21 static Fs::Ufs::StoreFSufs<Fs::Ufs::UFSSwapDir> *AufsInstance;
22 #endif
23
24 #if HAVE_FS_DISKD
25 static Fs::Ufs::StoreFSufs<Fs::Ufs::UFSSwapDir> *DiskdInstance;
26 #endif
27
28 #if HAVE_FS_ROCK
29 #include "fs/rock/RockStoreFileSystem.h"
30 static Rock::StoreFileSystem *RockInstance = NULL;
31 #endif
32
33 void 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
54 void 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