From: Sage Weil Date: Wed, 18 Aug 2010 20:49:11 +0000 (-0700) Subject: mds: fix null snapflush logic X-Git-Tag: v0.22~255 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c8701f29f0a6f3777c41f8952c054ba4dd41b9d4;p=ceph.git mds: fix null snapflush logic We only want to do a null snapflush if we _know_ there isn't another one coming: that is, there aren't any outstanding issued excl/wr cap bits at the client. The old test has the bitwise NOT backwards. We can also limit the test to the bits we care about. --- diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index 801f197a636..99bcf80105a 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -1862,11 +1862,11 @@ void Locker::handle_client_caps(MClientCaps *m) // missing/skipped snapflush? - // ** only if the client has completed all revocations. if we + // ** only if the client has completed all WR/EXCL revocations. if we // are still revoking, it's possible the client is waiting for // data writeback and hasn't sent the flushsnap yet. ** if (head_in->client_need_snapflush.size()) { - if ((cap->pending() & ~cap->issued()) == 0) { + if ((cap->issued() & CEPH_CAP_ANY_WR & ~cap->pending()) == 0) { map >::iterator p = head_in->client_need_snapflush.begin(); while (p != head_in->client_need_snapflush.end()) { // p->first is the snap inode's ->last