From: Sage Weil Date: Sat, 14 Nov 2009 00:27:26 +0000 (-0800) Subject: uclient: use Inode::auth_cap to find mds to write back snap cap metadata to X-Git-Tag: v0.18~98^2~7^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a22418bb94d3525e7e00b05a7a82528632ef375f;p=ceph.git uclient: use Inode::auth_cap to find mds to write back snap cap metadata to --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 08e6dfd4bb46..d51780a6da36 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -1889,13 +1889,8 @@ void Client::flush_snaps(Inode *in) // pick auth mds int mds = -1; int mseq = 0; - for (map::iterator p = in->caps.begin(); p != in->caps.end(); p++) { - if (p->second->issued & CEPH_CAP_ANY_WR) { - mds = p->first; - mseq = p->second->mseq; - break; - } - } + assert(in->auth_cap); + mds = in->auth_cap->session->inst.name.num(); assert(mds >= 0); for (map::iterator p = in->cap_snaps.begin(); p != in->cap_snaps.end(); p++) {