]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/StoreFileSystem.cc
2 * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
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.
9 /* DEBUG: section 92 Storage File System */
12 #include "StoreFileSystem.h"
14 std::vector
<StoreFileSystem
*> *StoreFileSystem::_FileSystems
= NULL
;
17 StoreFileSystem::RegisterAllFsWithCacheManager(void)
19 for (iterator i
= GetFileSystems().begin(); i
!= GetFileSystems().end(); ++i
)
20 (*i
)->registerWithCacheManager();
24 StoreFileSystem::SetupAllFs()
26 for (iterator i
= GetFileSystems().begin(); i
!= GetFileSystems().end(); ++i
)
27 /* Call the FS to set up capabilities and initialize the FS driver */
32 StoreFileSystem::FsAdd(StoreFileSystem
&instance
)
34 iterator i
= GetFileSystems().begin();
36 while (i
!= GetFileSystems().end()) {
37 assert(strcmp((*i
)->type(), instance
.type()) != 0);
41 GetFileSystems().push_back (&instance
);
44 std::vector
<StoreFileSystem
*> const &
45 StoreFileSystem::FileSystems()
47 return GetFileSystems();
50 std::vector
<StoreFileSystem
*> &
51 StoreFileSystem::GetFileSystems()
54 _FileSystems
= new std::vector
<StoreFileSystem
*>;
60 * called when a graceful shutdown is to occur
64 StoreFileSystem::FreeAllFs()
66 while (!GetFileSystems().empty()) {
67 StoreFileSystem
*fs
= GetFileSystems().back();
68 GetFileSystems().pop_back();
73 /* no filesystem is required to export statistics */
75 StoreFileSystem::registerWithCacheManager(void)