]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
client: Fix caps_ref[c]<0 assert
authorKotresh HR <khiremat@redhat.com>
Mon, 30 Sep 2024 07:15:04 +0000 (12:45 +0530)
committerKotresh HR <khiremat@redhat.com>
Fri, 4 Oct 2024 17:05:55 +0000 (22:35 +0530)
commit10c8330f20cd2e93ce036d0ea2c38552d71b62c6
tree065c3e47c121e432b131e70b119adb9ee3023070
parent3ebe97484d26cf5d9cd78636ee4718c075a2897b
client: Fix caps_ref[c]<0 assert

When libcephfs aio tests (src/test/client) are run
with objectcacher disabled (ceph_test_client --client_oc=false),
the TestClient.LlreadvLlwritev fails and core dumps. The client
hits the assert 'caps_ref[c]<0'.

This patch fixes the same. There is no need to give out cap_ref
and take it again between multiple read because of short reads.
In some cases, the get_caps used to fail in C_Read_Sync_NonBlocking::finish
causing cap_ref to go negative when put_cap_ref is done at last in
C_Read_Finish::finish_io

Fixes: https://tracker.ceph.com/issues/68308
Signed-off-by: Kotresh HR <khiremat@redhat.com>
src/client/Client.cc