]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commitdiff
ceph: ammed reserve size for cap release messages
authorYehuda Sadeh <yehuda@hq.newdream.net>
Mon, 21 Jun 2010 17:19:20 +0000 (10:19 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Mon, 21 Jun 2010 21:30:54 +0000 (14:30 -0700)
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
fs/ceph/mds_client.c

index 55cd87a35176e05fe707fc7de79b68fdcdddac87..72808f5b83877523ebad876386a96ab960f902d1 100644 (file)
@@ -1102,7 +1102,7 @@ static int trim_caps(struct ceph_mds_client *mdsc,
 
 static int __need_alloc_caps_reserve(struct ceph_mds_client *mdsc)
 {
-       int need = mdsc->caps_total_count +
+       int need = (mdsc->caps_use_count + mdsc->caps_reserve_count) * 2 +
                   mdsc->max_sessions * CEPH_CAPS_PER_RELEASE;
        return (mdsc->caps_num_releases < need);
 }