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 <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/405332
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
Daniel Verkamp 2018-03-26 11:19:46 -07:00
parent d9ba3805c7
commit 2c7e3a05e3

View File

@ -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