From: Willem Jan Withagen Date: Fri, 3 Dec 2021 10:32:59 +0000 (+0100) Subject: Bluestore: Add missing stubs for OSes not Linux X-Git-Tag: v17.1.0~113^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fc870dc018da502130c006fe62d453d0fd444af8;p=ceph.git Bluestore: Add missing stubs for OSes not Linux Otherwise the linker wil complain: ''' usr/local/bin/x86_64-unknown-freebsd14.0-ld: /usr/local/bin/x86_64-unknown-freebsd14.0-ld: /usr/local/bin/x86_64-unknown-freebsd 14.0-ld: ../../lib/libblk.a(KernelDevice.cc.o): in function `KernelDevice::open(std::__1::basic_string, std::__1::allocator > const&)': /home/jenkins/workspace/ceph-master-compile/src/blk/kernel/KernelDevice.cc:236: undefined reference to `BlkDev::get_optimal_io_s ize() const' ''' Fixes: #43691 Fixes: https://tracker.ceph.com/issues/53483 Signed-off-by: Willem Jan Withagen --- diff --git a/src/common/blkdev.cc b/src/common/blkdev.cc index ea81bf0ae1e9..5f340c40ebb1 100644 --- a/src/common/blkdev.cc +++ b/src/common/blkdev.cc @@ -859,6 +859,11 @@ int BlkDev::discard(int64_t offset, int64_t len) const return -EOPNOTSUPP; } +int BlkDev::get_optimal_io_size() const +{ + return 0; +} + bool BlkDev::is_rotational() const { return false; @@ -988,6 +993,11 @@ int BlkDev::discard(int64_t offset, int64_t len) const return -EOPNOTSUPP; } +int BlkDev::get_optimal_io_size() const +{ + return 0; +} + bool BlkDev::is_rotational() const { #if __FreeBSD_version >= 1200049