From af6cf437303e2942874a19b23ded174ab9680d3d Mon Sep 17 00:00:00 2001 From: Evgeny Budilovsky Date: Sun, 7 Jan 2024 14:21:33 +0200 Subject: [PATCH] NBS-3864: set vhost rdma backend device offset to 0 device offset is not used for rdma since we access device through disk agent which takes care of translating request to correct device physical offset --- .../libs/endpoints_vhost/external_vhost_server.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cloud/blockstore/libs/endpoints_vhost/external_vhost_server.cpp b/cloud/blockstore/libs/endpoints_vhost/external_vhost_server.cpp index 2de95508be3..a6a0502f610 100644 --- a/cloud/blockstore/libs/endpoints_vhost/external_vhost_server.cpp +++ b/cloud/blockstore/libs/endpoints_vhost/external_vhost_server.cpp @@ -850,11 +850,16 @@ class TExternalVhostEndpointListener final for (const auto& device: volume.GetDevices()) { const ui64 size = device.GetBlockCount() * volume.GetBlockSize(); + auto offset = device.GetPhysicalOffset(); + if (epType == EEndpointType::Rdma) { + offset = 0; + } + args.insert(args.end(), { "--device", TStringBuilder() << GetDevicePath(epType, device) << ":" << size << ":" - << device.GetPhysicalOffset() + << offset }); }