]>
Commit | Line | Data |
---|---|---|
bbc27441 AJ |
1 | /* |
2 | * Copyright (C) 1996-2014 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 | ||
582c2af2 | 9 | #include "squid.h" |
7b5b7ba8 CT |
10 | #include "Module.h" |
11 | #if defined(HAVE_FS_UFS) || defined(HAVE_FS_AUFS) || defined(HAVE_FS_DISKD) | |
12 | #include "fs/ufs/StoreFSufs.h" | |
58373ff8 | 13 | #include "fs/ufs/UFSSwapDir.h" |
7b5b7ba8 CT |
14 | #endif |
15 | ||
32d002cb | 16 | #if HAVE_FS_UFS |
58373ff8 | 17 | static Fs::Ufs::StoreFSufs<Fs::Ufs::UFSSwapDir> *UfsInstance; |
7b5b7ba8 CT |
18 | #endif |
19 | ||
32d002cb | 20 | #if HAVE_FS_AUFS |
58373ff8 | 21 | static Fs::Ufs::StoreFSufs<Fs::Ufs::UFSSwapDir> *AufsInstance; |
7b5b7ba8 CT |
22 | #endif |
23 | ||
32d002cb | 24 | #if HAVE_FS_DISKD |
58373ff8 | 25 | static Fs::Ufs::StoreFSufs<Fs::Ufs::UFSSwapDir> *DiskdInstance; |
7b5b7ba8 CT |
26 | #endif |
27 | ||
6a1e1f3b | 28 | #if HAVE_FS_ROCK |
e2851fe7 AR |
29 | #include "fs/rock/RockStoreFileSystem.h" |
30 | static Rock::StoreFileSystem *RockInstance = NULL; | |
31 | #endif | |
32 | ||
af6a12ee AJ |
33 | void Fs::Init() |
34 | { | |
7b5b7ba8 | 35 | |
32d002cb | 36 | #if HAVE_FS_UFS |
58373ff8 | 37 | UfsInstance = new Fs::Ufs::StoreFSufs<Fs::Ufs::UFSSwapDir>("Blocking", "ufs"); |
7b5b7ba8 CT |
38 | #endif |
39 | ||
32d002cb | 40 | #if HAVE_FS_AUFS |
58373ff8 | 41 | AufsInstance = new Fs::Ufs::StoreFSufs<Fs::Ufs::UFSSwapDir>("DiskThreads", "aufs");; |
7b5b7ba8 CT |
42 | #endif |
43 | ||
32d002cb | 44 | #if HAVE_FS_DISKD |
58373ff8 | 45 | DiskdInstance = new Fs::Ufs::StoreFSufs<Fs::Ufs::UFSSwapDir>("DiskDaemon", "diskd");; |
7b5b7ba8 CT |
46 | #endif |
47 | ||
6a1e1f3b | 48 | #if HAVE_FS_ROCK |
e2851fe7 AR |
49 | RockInstance = new Rock::StoreFileSystem(); |
50 | #endif | |
51 | ||
7b5b7ba8 CT |
52 | } |
53 | ||
af6a12ee AJ |
54 | void Fs::Clean() |
55 | { | |
32d002cb | 56 | #if HAVE_FS_UFS |
7b5b7ba8 CT |
57 | delete UfsInstance; |
58 | #endif | |
59 | ||
32d002cb | 60 | #if HAVE_FS_AUFS |
7b5b7ba8 CT |
61 | delete AufsInstance; |
62 | #endif | |
63 | ||
32d002cb | 64 | #if HAVE_FS_DISKD |
7b5b7ba8 CT |
65 | delete DiskdInstance; |
66 | #endif | |
67 | ||
6a1e1f3b | 68 | #if HAVE_FS_ROCK |
e2851fe7 AR |
69 | delete RockInstance; |
70 | #endif | |
71 | ||
7b5b7ba8 | 72 | } |
f53969cc | 73 |