]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
client: Fix libcephfs aio metadata corruption.
authorKotresh HR <khiremat@redhat.com>
Thu, 26 Sep 2024 05:20:32 +0000 (10:50 +0530)
committerKotresh HR <khiremat@redhat.com>
Fri, 4 Oct 2024 17:05:53 +0000 (22:35 +0530)
commit3ebe97484d26cf5d9cd78636ee4718c075a2897b
tree2a009645c291e5f0beec7c6ca9662de2639756f5
parentb5af1c1ffe8786a96c866edcec69c78030e9f2e4
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>
src/client/Client.cc
src/client/Client.h