From 022c5261800ba6f9642b1f8dc7e44c91b12956eb Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Wed, 20 Jul 2011 10:02:01 -0700 Subject: [PATCH] uclient: correctly initialize mseq in flush_snaps. Previously we set mseq=0 unconditionally; this was a mistake that creeped in via bitrot. Instead, set mseq from the auth cap. This bug meant that any inodes which had gotten migrated between MDSes would have their flush_snap messages dropped by the MDS. Resolves #1324. Signed-off-by: Greg Farnum --- src/client/Client.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index 47e7bf72b3ca2..c6db2b498de5d 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -2134,10 +2134,9 @@ void Client::flush_snaps(Inode *in, bool all_again, CapSnap *again) assert(in->cap_snaps.size()); // pick auth mds - int mds = -1; - int mseq = 0; assert(in->auth_cap); - mds = in->auth_cap->session->inst.name.num(); + int mds = in->auth_cap->session->inst.name.num(); + int mseq = in->auth_cap->mseq; assert(mds >= 0); for (map::iterator p = in->cap_snaps.begin(); p != in->cap_snaps.end(); p++) { -- 2.39.5