Commit 2c7e3a05 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

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: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/405332


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent d9ba3805
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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