From: Yan, Zheng Date: Mon, 11 Jan 2016 12:51:17 +0000 (+0800) Subject: mds: fix flushing caps check X-Git-Tag: v10.0.3~12^2~2^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f57e6162c7c3fea31b01568f90a76710f97943ae;p=ceph.git mds: fix flushing caps check Client may flush and drop caps at the same time. If client need to send cap reconnect before the caps get flushed. The issued caps in the cap reconnect does not include the flushing caps. When choosing lock states we should consider the flushing caps. The check for caps haven't been flushed is wrong, fix it. Signed-off-by: Yan, Zheng --- diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index eb83299515e..26a3f104d9e 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -2465,7 +2465,7 @@ void Locker::handle_client_caps(MClientCaps *m) if (!mds->is_clientreplay() && !mds->is_active() && !mds->is_stopping()) { if (mds->is_reconnect() && m->get_dirty() && m->get_client_tid() > 0 && - session->have_completed_flush(m->get_client_tid())) { + !session->have_completed_flush(m->get_client_tid())) { mdcache->set_reconnect_dirty_caps(m->get_ino(), m->get_dirty()); } mds->wait_for_replay(new C_MDS_RetryMessage(mds, m));