]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
bluestore/BlueFS: fix bytes_written_slow counter with aio_write
authorchungfengz <chungfengz@synology.com>
Thu, 6 Nov 2025 09:46:51 +0000 (09:46 +0000)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Fri, 21 Nov 2025 12:41:31 +0000 (19:41 +0700)
commitb23d203ddf2d12f1318fe5f43a87f440f202c231
tree11bd0c81c95dc81c20ba9c25285afd73e97da03a
parent891960540ce4fe9a1f123d948e664c60c29011d8
bluestore/BlueFS: fix bytes_written_slow counter with aio_write

The bytes_written_slow performance counter was incorrectly reporting
0 when using async I/O.

When aio_write() is called with a bufferlist, it uses claim_append()
to transfer ownership of the buffer to the aio structure, leaving the
source bufferlist empty. Using t.length() after aio_write() returns 0
instead of the actual bytes written.

Fix by using the pre-calculated x_len value which contains the actual
write size and is not affected by the buffer ownership transfer.

Fixes: https://tracker.ceph.com/issues/73735
Signed-off-by: chungfengz <chungfengz@synology.com>
(cherry picked from commit 5aa5b03932c4345343e5263431914c2484bd2b14)
src/os/bluestore/BlueFS.cc