From: chentao.2022 Date: Mon, 5 Aug 2024 15:38:50 +0000 (+0800) Subject: cephfs: Fixed a bug that read operation hung in Client::get_caps when the Fc caps... X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=93a1b5635db333542655105fba822e297ba78ac7;p=ceph.git cephfs: Fixed a bug that read operation hung in Client::get_caps when the Fc caps is wanted but revoked by the mds, and the Fc cap refs is no-zero Fixes: https://tracker.ceph.com/issues/65971 Signed-off-by: Tod Chen (cherry picked from commit 7f723017454957f3e4e1dbb4613bcf94afa4151e) --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 0be0e141d2b..e05ca9aa3ae 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -3627,6 +3627,9 @@ void Client::put_cap_ref(Inode *in, int cap) if (last & CEPH_CAP_FILE_CACHE) { ldout(cct, 5) << __func__ << " dropped last FILE_CACHE ref on " << *in << dendl; ++put_nref; + + ldout(cct, 10) << __func__ << " calling signal_caps_inode" << dendl; + signal_cond_list(in->waitfor_caps); } if (drop) check_caps(in, 0);