]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
client: Fix libcephfs aio metadata corruption.
authorKotresh HR <khiremat@redhat.com>
Thu, 26 Sep 2024 05:20:32 +0000 (10:50 +0530)
committerVenky Shankar <vshankar@redhat.com>
Mon, 23 Jun 2025 03:41:16 +0000 (09:11 +0530)
commitce59fc007b04392764fefbbbb8331d882a92af0d
treeb787b8d743a4531aa4fb32650e2fd7626ab97f62
parent9ca11c61097e5bac2ca8448c5d1e4fab8c3f75fa
client: Fix libcephfs aio metadata corruption.

Problem:
With cephfs nfs-ganesha, there were following
asserts hit while doing write on a file.

1. FAILED ceph_assert((bool)_front == (bool)_size)
2. FAILED ceph_assert(cap_refs[c] > 0)

Cause:
In aio path, the client_lock was not being held
in the internal callback after the io is done where
it's expected to be taken leading to corruption.

Fix:
Take client_lock in the callback

Fixes: https://tracker.ceph.com/issues/68146
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit 3ebe97484d26cf5d9cd78636ee4718c075a2897b)
src/client/Client.cc
src/client/Client.h