]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix flushing caps check
authorYan, Zheng <zyan@redhat.com>
Mon, 11 Jan 2016 12:51:17 +0000 (20:51 +0800)
committerYan, Zheng <zyan@redhat.com>
Wed, 13 Jan 2016 07:28:54 +0000 (15:28 +0800)
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 <zyan@redhat.com>
src/mds/Locker.cc

index eb83299515e863bb8216b1aca79f667956f07f90..26a3f104d9e3e5da629d7cb7821c4e5a53270251 100644 (file)
@@ -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));