From: Yan, Zheng Date: Wed, 17 Dec 2014 06:09:52 +0000 (+0800) Subject: mds: properly update capability's client_follow X-Git-Tag: v0.93~87^2~27 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f192e2dceac7dbb14785f6896bbff34cb9fdf8d8;p=ceph.git mds: properly update capability's client_follow handle discontinuous snapid(s) Fixes: #10323 Signed-off-by: Yan, Zheng --- diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index 8370fa63080a..39dcbb4d38f3 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -2536,7 +2536,7 @@ void Locker::handle_client_caps(MClientCaps *m) << " client." << client << " on " << *in << dendl; // this cap now follows a later snap (i.e. the one initiating this flush, or later) - cap->client_follows = MAX(follows, in->first) + 1; + cap->client_follows = MAX(snap, (snapid_t)(in->first + 1)); // we can prepare the ack now, since this FLUSHEDSNAP is independent of any // other cap ops. (except possibly duplicate FLUSHSNAP requests, but worst @@ -2860,7 +2860,7 @@ void Locker::_do_snap_update(CInode *in, snapid_t snap, int dirty, snapid_t foll } if (pi->client_ranges.count(client)) { - if (in->last == follows+1) { + if (in->last == snap) { dout(10) << " removing client_range entirely" << dendl; pi->client_ranges.erase(client); } else {