Skip to content

Commit e288069

Browse files
authored
Merge pull request ceph#65869 from tchaikov/wip-crimson-aligned-dma-write
crimson/seastore: use DMA alignment for block size instead of stat Reviewed-by: Matan Breizman <[email protected]>
2 parents 8c1f97a + c5ed7ce commit e288069

File tree

1 file changed

+3
-0
lines changed
  • src/crimson/os/seastore/segment_manager

1 file changed

+3
-0
lines changed

src/crimson/os/seastore/segment_manager/block.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,9 @@ open_device_ret open_device(
267267
).then([stat, &path, FNAME](auto file) mutable {
268268
return file.size().then([stat, file, &path, FNAME](auto size) mutable {
269269
stat.size = size;
270+
// Use Seastar's DMA alignment requirement instead of stat's block_size
271+
// to ensure writes are properly aligned for optimal performance
272+
stat.block_size = file.disk_write_dma_alignment();
270273
INFO("path={} successful, size=0x{:x}, block_size=0x{:x}",
271274
path, stat.size, stat.block_size);
272275
return std::make_pair(file, stat);

0 commit comments

Comments
 (0)