From 7fcf29d6dcd847cf5b244002f0f580b81925ea18 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Fri, 17 Jun 2011 11:52:13 -0700 Subject: [PATCH] uclient: fix flush_caps(Inode*,int) This function was just broken before. You need to be setting flushing_cap_tids for the caps you're actually flushing, which in this case is in->dirty_caps, not the horribly-named "flush" variable. Also, rename "flush" to "retain" since that's what it actually is! Signed-off-by: Greg Farnum --- src/client/Client.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index a4d5041ad3475..f189a50236a3c 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -2425,14 +2425,14 @@ void Client::flush_caps(Inode *in, int mds) { dout(10) << "flush_caps(inode:" << in << ", mds" << mds << ")" << dendl; InodeCap *cap = in->caps[mds]; int wanted = in->caps_wanted(); - int flush = wanted | CEPH_CAP_PIN; + int retain = wanted | CEPH_CAP_PIN; int flush_tid = ++in->last_flush_tid; //set up flush tid stores for (int i = 0; i < CEPH_CAP_BITS; ++i) { - if (flush & (1<dirty_caps & (1<flushing_cap_tid[i] = flush_tid; } - send_cap(in, mds, cap, in->caps_used(), wanted, flush, in->dirty_caps, flush_tid); + send_cap(in, mds, cap, in->caps_used(), wanted, retain, in->dirty_caps, flush_tid); } void Client::wait_sync_caps(uint64_t want) -- 2.39.5