]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
client: Prevent race condition when printing Inode in ll_sync_inode
authorChengen Du <chengen.du@canonical.com>
Mon, 12 Aug 2024 07:49:57 +0000 (15:49 +0800)
committerChengen Du <chengen.du@canonical.com>
Mon, 12 Aug 2024 10:17:37 +0000 (18:17 +0800)
commit2b78a5b3147d4e97be332ca88d286aec0ce44dc3
tree8ae56cfac4d22b1197fa284ee4cc037012836522
parent530a2608c02c5e070e0e86b7f0b897f8a2174c6e
client: Prevent race condition when printing Inode in ll_sync_inode

In the ll_sync_inode function, the entire Inode structure is printed without
holding a lock. This can lead to a race condition when evaluating the assertion
in xlist<ObjectCacher::Object*>::size(), resulting in abnormal behavior.

Fixes: https://tracker.ceph.com/issues/67491
Co-authored-by: dongdong tao <tdd21151186@gmail.com>
Signed-off-by: Chengen Du <chengen.du@canonical.com>
src/client/Client.cc