mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-10 04:50:31 -04:00
refactor(block_cache): move to internal namespace
This commit is contained in:
parent
1e6aa111f2
commit
dd5427823e
@ -629,11 +629,11 @@ list(APPEND LIBDWARFS_COMMON_SRC
|
||||
)
|
||||
|
||||
list(APPEND LIBDWARFS_READER_SRC
|
||||
src/dwarfs/block_cache.cpp
|
||||
src/dwarfs/block_range.cpp
|
||||
src/dwarfs/cached_block.cpp
|
||||
src/dwarfs/filesystem_v2.cpp
|
||||
src/dwarfs/fs_section.cpp
|
||||
src/dwarfs/internal/block_cache.cpp
|
||||
src/dwarfs/internal/inode_reader_v2.cpp
|
||||
src/dwarfs/internal/metadata_v2.cpp
|
||||
src/dwarfs/internal/metadata_types.cpp
|
||||
|
@ -42,6 +42,8 @@ class mmif;
|
||||
class os_access;
|
||||
class performance_monitor;
|
||||
|
||||
namespace internal {
|
||||
|
||||
class block_cache {
|
||||
public:
|
||||
block_cache(logger& lgr, os_access const& os, std::shared_ptr<mmif> mm,
|
||||
@ -81,4 +83,6 @@ class block_cache {
|
||||
private:
|
||||
std::unique_ptr<impl> impl_;
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
} // namespace dwarfs
|
@ -32,7 +32,6 @@
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include <dwarfs/block_cache.h>
|
||||
#include <dwarfs/block_compressor.h>
|
||||
#include <dwarfs/block_data.h>
|
||||
#include <dwarfs/categorizer.h>
|
||||
@ -43,6 +42,7 @@
|
||||
#include <dwarfs/fs_section.h>
|
||||
#include <dwarfs/fstypes.h>
|
||||
#include <dwarfs/history.h>
|
||||
#include <dwarfs/internal/block_cache.h>
|
||||
#include <dwarfs/internal/inode_reader_v2.h>
|
||||
#include <dwarfs/internal/metadata_v2.h>
|
||||
#include <dwarfs/internal/worker_group.h>
|
||||
@ -610,7 +610,7 @@ filesystem_<LoggerPolicy>::filesystem_(
|
||||
PERFMON_CLS_TIMER_INIT(readv_future)
|
||||
PERFMON_CLS_TIMER_INIT(readv_future_throw) // clang-format on
|
||||
{
|
||||
block_cache cache(lgr, os_, mm_, options.block_cache, perfmon);
|
||||
internal::block_cache cache(lgr, os_, mm_, options.block_cache, perfmon);
|
||||
filesystem_parser parser(mm_, image_offset_);
|
||||
|
||||
if (parser.has_index()) {
|
||||
|
@ -42,9 +42,9 @@
|
||||
#include <folly/stats/Histogram.h>
|
||||
#include <folly/system/ThreadName.h>
|
||||
|
||||
#include <dwarfs/block_cache.h>
|
||||
#include <dwarfs/cached_block.h>
|
||||
#include <dwarfs/fs_section.h>
|
||||
#include <dwarfs/internal/block_cache.h>
|
||||
#include <dwarfs/internal/worker_group.h>
|
||||
#include <dwarfs/logger.h>
|
||||
#include <dwarfs/mmif.h>
|
||||
@ -52,7 +52,9 @@
|
||||
#include <dwarfs/performance_monitor.h>
|
||||
#include <dwarfs/util.h>
|
||||
|
||||
namespace dwarfs {
|
||||
namespace dwarfs::internal {
|
||||
|
||||
namespace {
|
||||
|
||||
class sequential_access_detector {
|
||||
public:
|
||||
@ -791,6 +793,8 @@ class block_cache_ final : public block_cache::impl {
|
||||
cache_tidy_config tidy_config_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
block_cache::block_cache(logger& lgr, os_access const& os,
|
||||
std::shared_ptr<mmif> mm,
|
||||
const block_cache_options& options,
|
||||
@ -798,4 +802,4 @@ block_cache::block_cache(logger& lgr, os_access const& os,
|
||||
: impl_(make_unique_logging_object<impl, block_cache_, logger_policies>(
|
||||
lgr, os, std::move(mm), options, std::move(perfmon))) {}
|
||||
|
||||
} // namespace dwarfs
|
||||
} // namespace dwarfs::internal
|
@ -32,8 +32,8 @@
|
||||
#include <folly/container/EvictingCacheMap.h>
|
||||
#include <folly/stats/Histogram.h>
|
||||
|
||||
#include <dwarfs/block_cache.h>
|
||||
#include <dwarfs/fstypes.h>
|
||||
#include <dwarfs/internal/block_cache.h>
|
||||
#include <dwarfs/internal/inode_reader_v2.h>
|
||||
#include <dwarfs/internal/offset_cache.h>
|
||||
#include <dwarfs/iovec_read_buf.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user