summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeert Bosch <geert@mongodb.com>2015-05-12 15:38:32 -0500
committerGeert Bosch <geert@mongodb.com>2015-05-12 17:01:05 -0400
commit4486be04b169d967683ce705b6288c82cbd34947 (patch)
tree359b7b24b83a8588edc177983f67bc7cf0030851
parentb94f71a5dfa687aef2aa1af83e797683f9ad7476 (diff)
downloadmongo-4486be04b169d967683ce705b6288c82cbd34947.tar.gz
SERVER-18410: Move MMAPv1 specific libraries from util to db/storage/mmap_v1
Also removes some dependencies on MMAP_v1 specific files that are not needed anymore, and moves the 'paths' library to db/storage.
-rw-r--r--src/mongo/client/examples/mongoperf.cpp4
-rw-r--r--src/mongo/db/SConscript4
-rw-r--r--src/mongo/db/catalog/database_holder.cpp1
-rw-r--r--src/mongo/db/catalog/index_catalog_entry.cpp1
-rw-r--r--src/mongo/db/prefetch.cpp2
-rw-r--r--src/mongo/db/storage/SConscript11
-rw-r--r--src/mongo/db/storage/mmap_v1/SConscript55
-rw-r--r--src/mongo/db/storage/mmap_v1/compress.cpp (renamed from src/mongo/util/compress.cpp)2
-rw-r--r--src/mongo/db/storage/mmap_v1/compress.h (renamed from src/mongo/util/compress.h)0
-rw-r--r--src/mongo/db/storage/mmap_v1/data_file.cpp2
-rw-r--r--src/mongo/db/storage/mmap_v1/data_file_sync.cpp2
-rw-r--r--src/mongo/db/storage/mmap_v1/dur_journal.cpp8
-rw-r--r--src/mongo/db/storage/mmap_v1/dur_journalimpl.h2
-rw-r--r--src/mongo/db/storage/mmap_v1/dur_recover.cpp2
-rw-r--r--src/mongo/db/storage/mmap_v1/durable_mapped_file.h4
-rw-r--r--src/mongo/db/storage/mmap_v1/durop.cpp2
-rw-r--r--src/mongo/db/storage/mmap_v1/durop.h2
-rw-r--r--src/mongo/db/storage/mmap_v1/file_allocator.cpp (renamed from src/mongo/util/file_allocator.cpp)4
-rw-r--r--src/mongo/db/storage/mmap_v1/file_allocator.h (renamed from src/mongo/util/file_allocator.h)0
-rw-r--r--src/mongo/db/storage/mmap_v1/journal_latency_test_cmd.cpp4
-rw-r--r--src/mongo/db/storage/mmap_v1/logfile.cpp (renamed from src/mongo/util/logfile.cpp)6
-rw-r--r--src/mongo/db/storage/mmap_v1/logfile.h (renamed from src/mongo/util/logfile.h)0
-rw-r--r--src/mongo/db/storage/mmap_v1/mmap.cpp (renamed from src/mongo/util/mmap.cpp)2
-rw-r--r--src/mongo/db/storage/mmap_v1/mmap.h (renamed from src/mongo/util/mmap.h)0
-rw-r--r--src/mongo/db/storage/mmap_v1/mmap_posix.cpp (renamed from src/mongo/util/mmap_posix.cpp)4
-rw-r--r--src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp4
-rw-r--r--src/mongo/db/storage/mmap_v1/mmap_v1_extent_manager.cpp2
-rw-r--r--src/mongo/db/storage/mmap_v1/mmap_windows.cpp (renamed from src/mongo/util/mmap_windows.cpp)4
-rw-r--r--src/mongo/db/storage/mmap_v1/record_store_v1_capped.cpp2
-rw-r--r--src/mongo/db/storage/mmap_v1/repair_database.cpp4
-rw-r--r--src/mongo/db/storage/paths.cpp (renamed from src/mongo/util/paths.cpp)2
-rw-r--r--src/mongo/db/storage/paths.h (renamed from src/mongo/util/paths.h)0
-rw-r--r--src/mongo/db/storage/storage_engine_lock_file_posix.cpp2
-rw-r--r--src/mongo/dbtests/SConscript3
-rw-r--r--src/mongo/dbtests/basictests.cpp4
-rw-r--r--src/mongo/dbtests/perftests.cpp6
-rw-r--r--src/mongo/tools/sniffer.cpp2
-rw-r--r--src/mongo/util/SConscript54
38 files changed, 105 insertions, 108 deletions
diff --git a/src/mongo/client/examples/mongoperf.cpp b/src/mongo/client/examples/mongoperf.cpp
index 6bf6c4e59ec..db7231b41d4 100644
--- a/src/mongo/client/examples/mongoperf.cpp
+++ b/src/mongo/client/examples/mongoperf.cpp
@@ -46,10 +46,10 @@
#include "mongo/db/jsobj.h"
#include "mongo/db/json.h"
+#include "mongo/db/storage/mmap_v1/mmap.h"
+#include "mongo/db/storage/mmap_v1/logfile.h"
#include "mongo/platform/atomic_word.h"
#include "mongo/util/allocator.h"
-#include "mongo/util/logfile.h"
-#include "mongo/util/mmap.h"
#include "mongo/util/mongoutils/str.h"
#include "mongo/util/time_support.h"
#include "mongo/util/timer.h"
diff --git a/src/mongo/db/SConscript b/src/mongo/db/SConscript
index 0ea12270135..a074bbbf81b 100644
--- a/src/mongo/db/SConscript
+++ b/src/mongo/db/SConscript
@@ -635,8 +635,7 @@ serveronlyLibdeps = [
"$BUILD_DIR/mongo/s/serveronly",
"$BUILD_DIR/mongo/scripting/scripting_server",
"$BUILD_DIR/mongo/util/elapsed_tracker",
- "$BUILD_DIR/mongo/util/file_allocator",
- "$BUILD_DIR/mongo/util/mmap",
+ "$BUILD_DIR/mongo/db/storage/mmap_v1/file_allocator",
"$BUILD_DIR/third_party/shim_snappy",
"auth/authmongod",
"catalog/collection_options",
@@ -667,6 +666,7 @@ serveronlyLibdeps = [
"stats/top",
"storage/devnull/storage_devnull",
"storage/in_memory/storage_in_memory",
+ "storage/mmap_v1/mmap",
"storage/mmap_v1/storage_mmapv1",
"storage/storage_engine_lock_file",
"storage/storage_engine_metadata",
diff --git a/src/mongo/db/catalog/database_holder.cpp b/src/mongo/db/catalog/database_holder.cpp
index 9b23d193557..61110aa2b5e 100644
--- a/src/mongo/db/catalog/database_holder.cpp
+++ b/src/mongo/db/catalog/database_holder.cpp
@@ -42,7 +42,6 @@
#include "mongo/db/service_context.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/storage/storage_engine.h"
-#include "mongo/util/file_allocator.h"
#include "mongo/util/log.h"
namespace mongo {
diff --git a/src/mongo/db/catalog/index_catalog_entry.cpp b/src/mongo/db/catalog/index_catalog_entry.cpp
index ad4e3b31b3a..67c41f54fd0 100644
--- a/src/mongo/db/catalog/index_catalog_entry.cpp
+++ b/src/mongo/db/catalog/index_catalog_entry.cpp
@@ -43,7 +43,6 @@
#include "mongo/db/matcher/expression_parser.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/service_context.h"
-#include "mongo/util/file_allocator.h"
#include "mongo/util/log.h"
#include "mongo/util/scopeguard.h"
diff --git a/src/mongo/db/prefetch.cpp b/src/mongo/db/prefetch.cpp
index 1de1d565c47..fd306d8d5e2 100644
--- a/src/mongo/db/prefetch.cpp
+++ b/src/mongo/db/prefetch.cpp
@@ -43,8 +43,8 @@
#include "mongo/db/repl/replication_coordinator_global.h"
#include "mongo/db/server_parameters.h"
#include "mongo/db/stats/timer_stats.h"
+#include "mongo/db/storage/mmap_v1/mmap.h"
#include "mongo/util/log.h"
-#include "mongo/util/mmap.h"
namespace mongo {
diff --git a/src/mongo/db/storage/SConscript b/src/mongo/db/storage/SConscript
index 6dada1ec2c8..83d21072778 100644
--- a/src/mongo/db/storage/SConscript
+++ b/src/mongo/db/storage/SConscript
@@ -49,6 +49,15 @@ env.Library(
)
env.Library(
+ target='paths',
+ source=[
+ 'paths.cpp',
+ ],
+ LIBDEPS=[
+ ],
+)
+
+env.Library(
target='sorted_data_interface_test_harness',
source=[
'sorted_data_interface_test_bulkbuilder.cpp',
@@ -104,7 +113,7 @@ env.Library(
'storage_engine_lock_file_${TARGET_OS_FAMILY}.cpp',
],
LIBDEPS=[
- '$BUILD_DIR/mongo/util/paths',
+ 'paths',
]
)
diff --git a/src/mongo/db/storage/mmap_v1/SConscript b/src/mongo/db/storage/mmap_v1/SConscript
index c232cb43ce0..c7cbbd07e2c 100644
--- a/src/mongo/db/storage/mmap_v1/SConscript
+++ b/src/mongo/db/storage/mmap_v1/SConscript
@@ -33,13 +33,26 @@ env.Library(
'record_store_v1',
'record_access_tracker',
'btree',
- '$BUILD_DIR/mongo/util/logfile',
- '$BUILD_DIR/mongo/util/compress',
- '$BUILD_DIR/mongo/util/file_allocator',
- '$BUILD_DIR/mongo/util/paths',
+ 'file_allocator',
+ 'logfile',
+ 'compress',
+ '$BUILD_DIR/mongo/db/storage/paths',
]
)
+compressEnv = env.Clone()
+compressEnv.InjectThirdPartyIncludePaths(libraries=['snappy'])
+compressEnv
+compressEnv.Library(
+ target='compress',
+ source=[
+ 'compress.cpp',
+ ],
+ LIBDEPS=[
+ '$BUILD_DIR/mongo/db/storage/paths',
+ ],
+)
+
env.Library(
target= 'extent',
source= [
@@ -53,6 +66,38 @@ env.Library(
)
env.Library(
+ target='file_allocator',
+ source=[
+ 'file_allocator.cpp',
+ ],
+ LIBDEPS=[
+ '$BUILD_DIR/mongo/db/storage/paths',
+ ],
+)
+
+env.Library(
+ target='logfile',
+ source=[
+ 'logfile.cpp',
+ ],
+ LIBDEPS=[
+ '$BUILD_DIR/mongo/db/storage/paths',
+ ],
+)
+
+env.Library(
+ target='mmap',
+ source=[
+ 'mmap.cpp',
+ 'mmap_${TARGET_OS_FAMILY}.cpp',
+ ],
+ LIBDEPS=[
+ 'file_allocator',
+ '$BUILD_DIR/mongo/util/foundation',
+ ],
+)
+
+env.Library(
target= 'record_store_v1',
source= [
'record_store_v1_base.cpp',
@@ -162,7 +207,7 @@ env.Library(
],
LIBDEPS= [
'btree',
- '$BUILD_DIR/mongo/db/storage/mmap_v1/record_store_v1_test_help',
+ 'record_store_v1_test_help',
]
)
diff --git a/src/mongo/util/compress.cpp b/src/mongo/db/storage/mmap_v1/compress.cpp
index 92bbbafbefc..bae8bc5acba 100644
--- a/src/mongo/util/compress.cpp
+++ b/src/mongo/db/storage/mmap_v1/compress.cpp
@@ -30,7 +30,7 @@
#include "mongo/platform/basic.h"
-#include "mongo/util/compress.h"
+#include "mongo/db/storage/mmap_v1/compress.h"
#include <snappy.h>
diff --git a/src/mongo/util/compress.h b/src/mongo/db/storage/mmap_v1/compress.h
index b8afa4d90c5..b8afa4d90c5 100644
--- a/src/mongo/util/compress.h
+++ b/src/mongo/db/storage/mmap_v1/compress.h
diff --git a/src/mongo/db/storage/mmap_v1/data_file.cpp b/src/mongo/db/storage/mmap_v1/data_file.cpp
index fcd604d3206..04dda4902ef 100644
--- a/src/mongo/db/storage/mmap_v1/data_file.cpp
+++ b/src/mongo/db/storage/mmap_v1/data_file.cpp
@@ -42,7 +42,7 @@
#include "mongo/db/storage/mmap_v1/durable_mapped_file.h"
#include "mongo/db/storage/mmap_v1/mmap_v1_options.h"
#include "mongo/db/operation_context.h"
-#include "mongo/util/file_allocator.h"
+#include "mongo/db/storage/mmap_v1/file_allocator.h"
#include "mongo/util/log.h"
namespace mongo {
diff --git a/src/mongo/db/storage/mmap_v1/data_file_sync.cpp b/src/mongo/db/storage/mmap_v1/data_file_sync.cpp
index cf1d1abca88..b65124052d7 100644
--- a/src/mongo/db/storage/mmap_v1/data_file_sync.cpp
+++ b/src/mongo/db/storage/mmap_v1/data_file_sync.cpp
@@ -35,11 +35,11 @@
#include "mongo/db/commands/server_status_metric.h"
#include "mongo/db/service_context.h"
#include "mongo/db/instance.h"
+#include "mongo/db/storage/mmap_v1/mmap.h"
#include "mongo/db/storage/mmap_v1/mmap_v1_options.h"
#include "mongo/db/storage_options.h"
#include "mongo/util/exit.h"
#include "mongo/util/log.h"
-#include "mongo/util/mmap.h"
namespace mongo {
diff --git a/src/mongo/db/storage/mmap_v1/dur_journal.cpp b/src/mongo/db/storage/mmap_v1/dur_journal.cpp
index 50cb5ee3d22..1a08dc3c01c 100644
--- a/src/mongo/db/storage/mmap_v1/dur_journal.cpp
+++ b/src/mongo/db/storage/mmap_v1/dur_journal.cpp
@@ -41,24 +41,24 @@
#include "mongo/base/init.h"
#include "mongo/config.h"
#include "mongo/db/client.h"
+#include "mongo/db/storage/mmap_v1/mmap.h"
#include "mongo/db/storage/mmap_v1/aligned_builder.h"
+#include "mongo/db/storage/mmap_v1/compress.h"
#include "mongo/db/storage/mmap_v1/dur_journalformat.h"
#include "mongo/db/storage/mmap_v1/dur_journalimpl.h"
#include "mongo/db/storage/mmap_v1/dur_stats.h"
+#include "mongo/db/storage/mmap_v1/logfile.h"
#include "mongo/db/storage/mmap_v1/mmap_v1_options.h"
+#include "mongo/db/storage/paths.h"
#include "mongo/db/storage_options.h"
#include "mongo/platform/random.h"
#include "mongo/util/checksum.h"
-#include "mongo/util/compress.h"
#include "mongo/util/exit.h"
#include "mongo/util/file.h"
#include "mongo/util/hex.h"
#include "mongo/util/log.h"
-#include "mongo/util/logfile.h"
-#include "mongo/util/mmap.h"
#include "mongo/util/mongoutils/str.h"
#include "mongo/util/net/listen.h" // getelapsedtimemillis
-#include "mongo/util/paths.h"
#include "mongo/util/progress_meter.h"
#include "mongo/util/timer.h"
diff --git a/src/mongo/db/storage/mmap_v1/dur_journalimpl.h b/src/mongo/db/storage/mmap_v1/dur_journalimpl.h
index 04aca13e69d..7664e1f5265 100644
--- a/src/mongo/db/storage/mmap_v1/dur_journalimpl.h
+++ b/src/mongo/db/storage/mmap_v1/dur_journalimpl.h
@@ -31,7 +31,7 @@
#pragma once
#include "mongo/db/storage/mmap_v1/dur_journalformat.h"
-#include "mongo/util/logfile.h"
+#include "mongo/db/storage/mmap_v1/logfile.h"
namespace mongo {
namespace dur {
diff --git a/src/mongo/db/storage/mmap_v1/dur_recover.cpp b/src/mongo/db/storage/mmap_v1/dur_recover.cpp
index b4e0a6b3bd9..b6d997d4025 100644
--- a/src/mongo/db/storage/mmap_v1/dur_recover.cpp
+++ b/src/mongo/db/storage/mmap_v1/dur_recover.cpp
@@ -40,6 +40,7 @@
#include <sys/stat.h>
#include "mongo/db/operation_context_impl.h"
+#include "mongo/db/storage/mmap_v1/compress.h"
#include "mongo/db/storage/mmap_v1/dur_commitjob.h"
#include "mongo/db/storage/mmap_v1/dur_journal.h"
#include "mongo/db/storage/mmap_v1/dur_journalformat.h"
@@ -49,7 +50,6 @@
#include "mongo/db/storage/mmap_v1/mmap_v1_options.h"
#include "mongo/util/bufreader.h"
#include "mongo/util/checksum.h"
-#include "mongo/util/compress.h"
#include "mongo/util/exit.h"
#include "mongo/util/hex.h"
#include "mongo/util/log.h"
diff --git a/src/mongo/db/storage/mmap_v1/durable_mapped_file.h b/src/mongo/db/storage/mmap_v1/durable_mapped_file.h
index 53a211f609e..0ebbd9dd7c9 100644
--- a/src/mongo/db/storage/mmap_v1/durable_mapped_file.h
+++ b/src/mongo/db/storage/mmap_v1/durable_mapped_file.h
@@ -31,8 +31,8 @@
#pragma once
-#include "mongo/util/mmap.h"
-#include "mongo/util/paths.h"
+#include "mongo/db/storage/mmap_v1/mmap.h"
+#include "mongo/db/storage/paths.h"
namespace mongo {
diff --git a/src/mongo/db/storage/mmap_v1/durop.cpp b/src/mongo/db/storage/mmap_v1/durop.cpp
index aa70b169f32..ee91e0c60aa 100644
--- a/src/mongo/db/storage/mmap_v1/durop.cpp
+++ b/src/mongo/db/storage/mmap_v1/durop.cpp
@@ -42,7 +42,7 @@
#include "mongo/db/storage/mmap_v1/durable_mapped_file.h"
#include "mongo/db/storage/mmap_v1/mmap_v1_engine.h"
#include "mongo/util/file.h"
-#include "mongo/util/file_allocator.h"
+#include "mongo/db/storage/mmap_v1/file_allocator.h"
#include "mongo/util/log.h"
#include "mongo/util/mongoutils/str.h"
diff --git a/src/mongo/db/storage/mmap_v1/durop.h b/src/mongo/db/storage/mmap_v1/durop.h
index ee31780896f..e7da38a32d1 100644
--- a/src/mongo/db/storage/mmap_v1/durop.h
+++ b/src/mongo/db/storage/mmap_v1/durop.h
@@ -33,8 +33,8 @@
#include <boost/shared_ptr.hpp>
#include "mongo/db/storage/mmap_v1/dur_journalformat.h"
+#include "mongo/db/storage/paths.h"
#include "mongo/util/bufreader.h"
-#include "mongo/util/paths.h"
namespace mongo {
diff --git a/src/mongo/util/file_allocator.cpp b/src/mongo/db/storage/mmap_v1/file_allocator.cpp
index 5acf3d68cb2..d0bd764d25a 100644
--- a/src/mongo/util/file_allocator.cpp
+++ b/src/mongo/db/storage/mmap_v1/file_allocator.cpp
@@ -31,7 +31,7 @@
#include "mongo/platform/basic.h"
-#include "mongo/util/file_allocator.h"
+#include "mongo/db/storage/mmap_v1/file_allocator.h"
#include <boost/thread.hpp>
#include <boost/filesystem/operations.hpp>
@@ -51,6 +51,7 @@
# include <io.h>
#endif
+#include "mongo/db/storage/paths.h"
#include "mongo/platform/posix_fadvise.h"
#include "mongo/stdx/functional.h"
#include "mongo/util/concurrency/thread_name.h"
@@ -58,7 +59,6 @@
#include "mongo/util/fail_point_service.h"
#include "mongo/util/log.h"
#include "mongo/util/mongoutils/str.h"
-#include "mongo/util/paths.h"
#include "mongo/util/processinfo.h"
#include "mongo/util/time_support.h"
#include "mongo/util/timer.h"
diff --git a/src/mongo/util/file_allocator.h b/src/mongo/db/storage/mmap_v1/file_allocator.h
index aabe2a368bf..aabe2a368bf 100644
--- a/src/mongo/util/file_allocator.h
+++ b/src/mongo/db/storage/mmap_v1/file_allocator.h
diff --git a/src/mongo/db/storage/mmap_v1/journal_latency_test_cmd.cpp b/src/mongo/db/storage/mmap_v1/journal_latency_test_cmd.cpp
index bbabd11c179..8c29741ed7e 100644
--- a/src/mongo/db/storage/mmap_v1/journal_latency_test_cmd.cpp
+++ b/src/mongo/db/storage/mmap_v1/journal_latency_test_cmd.cpp
@@ -46,10 +46,10 @@
#include "mongo/db/query/internal_plans.h"
#include "mongo/db/storage_options.h"
#include "mongo/db/storage/mmap_v1/aligned_builder.h"
+#include "mongo/db/storage/mmap_v1/logfile.h"
+#include "mongo/db/storage/paths.h"
#include "mongo/scripting/engine.h"
#include "mongo/util/background.h"
-#include "mongo/util/logfile.h"
-#include "mongo/util/paths.h"
#include "mongo/util/timer.h"
namespace mongo {
diff --git a/src/mongo/util/logfile.cpp b/src/mongo/db/storage/mmap_v1/logfile.cpp
index 44e23e00dbc..8aa5e32626f 100644
--- a/src/mongo/util/logfile.cpp
+++ b/src/mongo/db/storage/mmap_v1/logfile.cpp
@@ -32,12 +32,13 @@
#include "mongo/platform/basic.h"
-#include "mongo/util/logfile.h"
+#include "mongo/db/storage/mmap_v1/logfile.h"
+#include "mongo/db/storage/mmap_v1/mmap.h"
+#include "mongo/db/storage/paths.h"
#include "mongo/platform/posix_fadvise.h"
#include "mongo/util/allocator.h"
#include "mongo/util/log.h"
-#include "mongo/util/mmap.h"
#include "mongo/util/mongoutils/str.h"
#include "mongo/util/startup_test.h"
#include "mongo/util/text.h"
@@ -138,7 +139,6 @@ namespace mongo {
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include "paths.h"
#include <sys/ioctl.h>
#ifdef __linux__
diff --git a/src/mongo/util/logfile.h b/src/mongo/db/storage/mmap_v1/logfile.h
index 278b9c162aa..278b9c162aa 100644
--- a/src/mongo/util/logfile.h
+++ b/src/mongo/db/storage/mmap_v1/logfile.h
diff --git a/src/mongo/util/mmap.cpp b/src/mongo/db/storage/mmap_v1/mmap.cpp
index 0f112e63c18..e9519fc7d94 100644
--- a/src/mongo/util/mmap.cpp
+++ b/src/mongo/db/storage/mmap_v1/mmap.cpp
@@ -31,7 +31,7 @@
#include "mongo/platform/basic.h"
-#include "mongo/util/mmap.h"
+#include "mongo/db/storage/mmap_v1/mmap.h"
#include <boost/filesystem/operations.hpp>
diff --git a/src/mongo/util/mmap.h b/src/mongo/db/storage/mmap_v1/mmap.h
index 7b34b21b254..7b34b21b254 100644
--- a/src/mongo/util/mmap.h
+++ b/src/mongo/db/storage/mmap_v1/mmap.h
diff --git a/src/mongo/util/mmap_posix.cpp b/src/mongo/db/storage/mmap_v1/mmap_posix.cpp
index 0c55cde7547..f7dffae468f 100644
--- a/src/mongo/util/mmap_posix.cpp
+++ b/src/mongo/db/storage/mmap_v1/mmap_posix.cpp
@@ -39,9 +39,9 @@
#include "mongo/platform/atomic_word.h"
#include "mongo/db/concurrency/d_concurrency.h"
-#include "mongo/util/file_allocator.h"
+#include "mongo/db/storage/mmap_v1/file_allocator.h"
+#include "mongo/db/storage/mmap_v1/mmap.h"
#include "mongo/util/log.h"
-#include "mongo/util/mmap.h"
#include "mongo/util/mongoutils/str.h"
#include "mongo/util/processinfo.h"
#include "mongo/util/startup_test.h"
diff --git a/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp b/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
index f84f7810bc3..595df3616f3 100644
--- a/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
+++ b/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
@@ -37,6 +37,7 @@
#include <fstream>
#include "mongo/db/mongod_options.h"
+#include "mongo/db/storage/mmap_v1/mmap.h"
#include "mongo/db/storage/mmap_v1/data_file_sync.h"
#include "mongo/db/storage/mmap_v1/dur.h"
#include "mongo/db/storage/mmap_v1/dur_journal.h"
@@ -46,9 +47,8 @@
#include "mongo/db/storage/mmap_v1/mmap_v1_options.h"
#include "mongo/db/storage/storage_engine_lock_file.h"
#include "mongo/db/storage_options.h"
-#include "mongo/util/file_allocator.h"
+#include "mongo/db/storage/mmap_v1/file_allocator.h"
#include "mongo/util/log.h"
-#include "mongo/util/mmap.h"
namespace mongo {
diff --git a/src/mongo/db/storage/mmap_v1/mmap_v1_extent_manager.cpp b/src/mongo/db/storage/mmap_v1/mmap_v1_extent_manager.cpp
index 17a72099531..01a13ee86a9 100644
--- a/src/mongo/db/storage/mmap_v1/mmap_v1_extent_manager.cpp
+++ b/src/mongo/db/storage/mmap_v1/mmap_v1_extent_manager.cpp
@@ -43,6 +43,7 @@
#include "mongo/db/storage/mmap_v1/record.h"
#include "mongo/db/storage/mmap_v1/extent.h"
#include "mongo/db/storage/mmap_v1/extent_manager.h"
+#include "mongo/db/storage/mmap_v1/mmap.h"
#include "mongo/db/storage/mmap_v1/mmap_v1_engine.h"
#include "mongo/db/storage/mmap_v1/mmap_v1_options.h"
#include "mongo/db/storage/record_fetcher.h"
@@ -50,7 +51,6 @@
#include "mongo/util/fail_point_service.h"
#include "mongo/util/file.h"
#include "mongo/util/log.h"
-#include "mongo/util/mmap.h"
namespace mongo {
diff --git a/src/mongo/util/mmap_windows.cpp b/src/mongo/db/storage/mmap_v1/mmap_windows.cpp
index 86e6c1e6b6b..2ce46d43584 100644
--- a/src/mongo/util/mmap_windows.cpp
+++ b/src/mongo/db/storage/mmap_v1/mmap_windows.cpp
@@ -31,10 +31,10 @@
#include "mongo/platform/basic.h"
-#include "mongo/util/mmap.h"
+#include "mongo/db/storage/mmap_v1/mmap.h"
#include "mongo/db/storage/mmap_v1/durable_mapped_file.h"
-#include "mongo/util/file_allocator.h"
+#include "mongo/db/storage/mmap_v1/file_allocator.h"
#include "mongo/util/log.h"
#include "mongo/util/processinfo.h"
#include "mongo/util/text.h"
diff --git a/src/mongo/db/storage/mmap_v1/record_store_v1_capped.cpp b/src/mongo/db/storage/mmap_v1/record_store_v1_capped.cpp
index 76eef273815..45143deb2ec 100644
--- a/src/mongo/db/storage/mmap_v1/record_store_v1_capped.cpp
+++ b/src/mongo/db/storage/mmap_v1/record_store_v1_capped.cpp
@@ -35,10 +35,10 @@
#include "mongo/db/operation_context_impl.h"
#include "mongo/db/storage/mmap_v1/extent.h"
#include "mongo/db/storage/mmap_v1/extent_manager.h"
+#include "mongo/db/storage/mmap_v1/mmap.h"
#include "mongo/db/storage/mmap_v1/record.h"
#include "mongo/db/storage/mmap_v1/record_store_v1_capped_iterator.h"
#include "mongo/util/log.h"
-#include "mongo/util/mmap.h"
#include "mongo/util/mongoutils/str.h"
/*
diff --git a/src/mongo/db/storage/mmap_v1/repair_database.cpp b/src/mongo/db/storage/mmap_v1/repair_database.cpp
index e8d05a3d352..777f8f25b05 100644
--- a/src/mongo/db/storage/mmap_v1/repair_database.cpp
+++ b/src/mongo/db/storage/mmap_v1/repair_database.cpp
@@ -46,12 +46,12 @@
#include "mongo/db/db_raii.h"
#include "mongo/db/index/index_descriptor.h"
#include "mongo/db/storage/mmap_v1/dur.h"
+#include "mongo/db/storage/mmap_v1/mmap.h"
#include "mongo/db/storage/mmap_v1/mmap_v1_database_catalog_entry.h"
#include "mongo/db/storage/mmap_v1/mmap_v1_options.h"
#include "mongo/util/file.h"
-#include "mongo/util/file_allocator.h"
+#include "mongo/db/storage/mmap_v1/file_allocator.h"
#include "mongo/util/log.h"
-#include "mongo/util/mmap.h"
#include "mongo/util/scopeguard.h"
namespace mongo {
diff --git a/src/mongo/util/paths.cpp b/src/mongo/db/storage/paths.cpp
index f33b7f095a4..cb2913c6b06 100644
--- a/src/mongo/util/paths.cpp
+++ b/src/mongo/db/storage/paths.cpp
@@ -29,7 +29,7 @@
#include "mongo/platform/basic.h"
-#include "mongo/util/paths.h"
+#include "mongo/db/storage/paths.h"
#include "mongo/util/log.h"
diff --git a/src/mongo/util/paths.h b/src/mongo/db/storage/paths.h
index 8286c920566..8286c920566 100644
--- a/src/mongo/util/paths.h
+++ b/src/mongo/db/storage/paths.h
diff --git a/src/mongo/db/storage/storage_engine_lock_file_posix.cpp b/src/mongo/db/storage/storage_engine_lock_file_posix.cpp
index 93227bbaf9a..6897f413fbe 100644
--- a/src/mongo/db/storage/storage_engine_lock_file_posix.cpp
+++ b/src/mongo/db/storage/storage_engine_lock_file_posix.cpp
@@ -41,9 +41,9 @@
#include <unistd.h>
#include <sstream>
+#include "mongo/db/storage/paths.h"
#include "mongo/platform/process_id.h"
#include "mongo/util/log.h"
-#include "mongo/util/paths.h"
#include "mongo/util/mongoutils/str.h"
namespace mongo {
diff --git a/src/mongo/dbtests/SConscript b/src/mongo/dbtests/SConscript
index 405382c3eaf..a4bf858b8d1 100644
--- a/src/mongo/dbtests/SConscript
+++ b/src/mongo/dbtests/SConscript
@@ -105,6 +105,7 @@ dbtest = env.Program(
"$BUILD_DIR/mongo/db/coredb",
"$BUILD_DIR/mongo/db/auth/authmocks",
"$BUILD_DIR/mongo/db/query/query",
+ "$BUILD_DIR/mongo/db/storage/paths",
"$BUILD_DIR/mongo/db/repl/repl_coordinator_global",
"$BUILD_DIR/mongo/db/repl/replmocks",
"$BUILD_DIR/mongo/bson/mutable/mutable_bson_test_utils",
@@ -113,8 +114,6 @@ dbtest = env.Program(
"$BUILD_DIR/mongo/db/serveronly",
"$BUILD_DIR/mongo/util/concurrency/rwlock",
"$BUILD_DIR/mongo/util/signal_handlers_synchronous",
- "$BUILD_DIR/mongo/util/paths",
- "$BUILD_DIR/mongo/util/concurrency/rwlock",
"mocklib",
"testframework",
],
diff --git a/src/mongo/dbtests/basictests.cpp b/src/mongo/dbtests/basictests.cpp
index 7b35a0ed54a..93ac8d0a1c3 100644
--- a/src/mongo/dbtests/basictests.cpp
+++ b/src/mongo/dbtests/basictests.cpp
@@ -36,10 +36,10 @@
#include <iostream>
#include "mongo/db/operation_context_impl.h"
+#include "mongo/db/storage/paths.h"
+#include "mongo/db/storage/mmap_v1/compress.h"
#include "mongo/dbtests/dbtests.h"
#include "mongo/util/base64.h"
-#include "mongo/util/compress.h"
-#include "mongo/util/paths.h"
#include "mongo/util/queue.h"
#include "mongo/util/stringutils.h"
#include "mongo/util/text.h"
diff --git a/src/mongo/dbtests/perftests.cpp b/src/mongo/dbtests/perftests.cpp
index 44758f346ae..20041d7b2c2 100644
--- a/src/mongo/dbtests/perftests.cpp
+++ b/src/mongo/dbtests/perftests.cpp
@@ -55,18 +55,18 @@
#include "mongo/db/json.h"
#include "mongo/db/lasterror.h"
#include "mongo/db/operation_context_impl.h"
+#include "mongo/db/storage/mmap_v1/btree/key.h"
+#include "mongo/db/storage/mmap_v1/compress.h"
#include "mongo/db/storage/mmap_v1/durable_mapped_file.h"
#include "mongo/db/storage/mmap_v1/dur_stats.h"
-#include "mongo/db/storage/mmap_v1/btree/key.h"
+#include "mongo/db/storage/mmap_v1/mmap.h"
#include "mongo/db/storage_options.h"
#include "mongo/dbtests/dbtests.h"
#include "mongo/dbtests/framework_options.h"
#include "mongo/util/allocator.h"
#include "mongo/util/checksum.h"
-#include "mongo/util/compress.h"
#include "mongo/util/fail_point.h"
#include "mongo/util/log.h"
-#include "mongo/util/mmap.h"
#include "mongo/util/timer.h"
#include "mongo/util/version.h"
#include "mongo/db/concurrency/lock_state.h"
diff --git a/src/mongo/tools/sniffer.cpp b/src/mongo/tools/sniffer.cpp
index 004bf66467e..d3be0dbefda 100644
--- a/src/mongo/tools/sniffer.cpp
+++ b/src/mongo/tools/sniffer.cpp
@@ -67,7 +67,7 @@
#include "mongo/client/dbclientinterface.h"
#include "mongo/db/dbmessage.h"
#include "mongo/util/net/message.h"
-#include "mongo/util/mmap.h"
+#include "mongo/db/storage/mmap_v1/mmap.h"
#include "mongo/util/quick_exit.h"
#include "mongo/util/text.h"
diff --git a/src/mongo/util/SConscript b/src/mongo/util/SConscript
index 1340ecc53ee..d17ae332330 100644
--- a/src/mongo/util/SConscript
+++ b/src/mongo/util/SConscript
@@ -299,18 +299,6 @@ env.Library(
)
env.Library(
- target='mmap',
- source=[
- 'mmap.cpp',
- 'mmap_${TARGET_OS_FAMILY}.cpp',
- ],
- LIBDEPS=[
- 'foundation',
- 'file_allocator',
- ],
-)
-
-env.Library(
target='elapsed_tracker',
source=[
'elapsed_tracker.cpp',
@@ -415,48 +403,6 @@ env.CppUnitTest(
],
)
-compressEnv = env.Clone()
-compressEnv.InjectThirdPartyIncludePaths(libraries=['snappy'])
-compressEnv
-compressEnv.Library(
- target='compress',
- source=[
- 'compress.cpp',
- ],
- LIBDEPS=[
- 'paths',
- ],
-)
-
-env.Library(
- target='logfile',
- source=[
- 'logfile.cpp',
- ],
- LIBDEPS=[
- 'paths',
- ],
-)
-
-env.Library(
- target='file_allocator',
- source=[
- 'file_allocator.cpp',
- ],
- LIBDEPS=[
- 'paths',
- ],
-)
-
-env.Library(
- target='paths',
- source=[
- 'paths.cpp',
- ],
- LIBDEPS=[
- ],
-)
-
env.Library(
target='password',
source=[