Merge pull request #65869 from tchaikov/wip-crimson-aligned-dma-write

crimson/seastore: use DMA alignment for block size instead of stat

Reviewed-by: Matan Breizman <mbreizma@redhat.com>
This commit is contained in:
Kefu Chai 2025-10-16 20:37:03 +08:00 committed by GitHub
commit e288069c4f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -267,6 +267,9 @@ open_device_ret open_device(
).then([stat, &path, FNAME](auto file) mutable {
return file.size().then([stat, file, &path, FNAME](auto size) mutable {
stat.size = size;
// Use Seastar's DMA alignment requirement instead of stat's block_size
// to ensure writes are properly aligned for optimal performance
stat.block_size = file.disk_write_dma_alignment();
INFO("path={} successful, size=0x{:x}, block_size=0x{:x}",
path, stat.size, stat.block_size);
return std::make_pair(file, stat);