From 2c7e3a05e3dd68fa4b2e35515e11a03b3c96dc58 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Mon, 26 Mar 2018 11:19:46 -0700 Subject: [PATCH] rocksdb: remove nonsensical fallocate #ifdef Our implementation of WritableFile::Allocate() was wrapped in #ifdef ROCKSDB_FALLOCATE_PRESENT, which is set based on whether the target system supports fallocate(); SPDK doesn't use the kernel filesystem interface, so using that check makes no sense. The #ifdef was also incorrectly wrapping WritableFile::RangeSync() and WritableFile::GetUniqueId(), which are totally unrelated to fallocate. Change-Id: I9655074353f79cf7a63e3e3d9c455cd39a683062 Signed-off-by: Daniel Verkamp Reviewed-on: https://review.gerrithub.io/405332 Tested-by: SPDK Automated Test System Reviewed-by: Jim Harris Reviewed-by: Changpeng Liu --- lib/rocksdb/env_spdk.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/rocksdb/env_spdk.cc b/lib/rocksdb/env_spdk.cc index ff96996e8..06a46edca 100644 --- a/lib/rocksdb/env_spdk.cc +++ b/lib/rocksdb/env_spdk.cc @@ -244,7 +244,6 @@ public: { return Status::OK(); } -#ifdef ROCKSDB_FALLOCATE_PRESENT virtual Status Allocate(uint64_t offset, uint64_t len) override { spdk_file_truncate(mFile, g_sync_args.channel, offset + len); @@ -263,7 +262,6 @@ public: { return 0; } -#endif }; Status