Skip to content

Commit 0684dd8

Browse files
authored
max vol io size (#102)
1 parent a6462f3 commit 0684dd8

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

conanfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class HomeBlocksConan(ConanFile):
1111
name = "homeblocks"
12-
version = "1.0.20"
12+
version = "1.0.21"
1313
homepage = "https://github.com/eBay/HomeBlocks"
1414
description = "Block Store built on HomeStore"
1515
topics = ("ebay")

src/include/homeblks/home_blks.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ class HomeBlocks {
7878
virtual std::shared_ptr< VolumeManager > volume_manager() = 0;
7979
virtual HomeBlocksStats get_stats() const = 0;
8080
virtual iomgr::drive_type data_drive_type() const = 0;
81+
virtual uint64_t max_vol_io_size() const = 0;
8182
};
8283

8384
extern std::shared_ptr< HomeBlocks > init_homeblocks(std::weak_ptr< HomeBlocksApplication >&& application);

src/lib/homeblks_impl.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class HomeBlocksImpl : public HomeBlocks, public VolumeManager, public std::enab
5454
static constexpr uint32_t DATA_BLK_SIZE = 4096;
5555
static constexpr uint32_t SB_FLAGS_GRACEFUL_SHUTDOWN{0x00000001};
5656
static constexpr uint32_t SB_FLAGS_RESTRICTED{0x00000002};
57-
57+
static constexpr uint64_t MAX_VOL_IO_SIZE = 1 * Mi; // 1 MiB
5858
private:
5959
/// Our SvcId retrieval and SvcId->IP mapping
6060
std::weak_ptr< HomeBlocksApplication > _application;
@@ -90,6 +90,8 @@ class HomeBlocksImpl : public HomeBlocks, public VolumeManager, public std::enab
9090

9191
peer_id_t our_uuid() const final { return our_uuid_; }
9292

93+
uint64_t max_vol_io_size() const final { return MAX_VOL_IO_SIZE; }
94+
9395
/// VolumeManager
9496
NullAsyncResult create_volume(VolumeInfo&& vol_info) final;
9597

0 commit comments

Comments
 (0)