Lines Matching refs:need
152 struct ceph_cap_reservation *ctx, int need) in ceph_reserve_caps() argument
160 dout("reserve caps ctx=%p need=%d\n", ctx, need); in ceph_reserve_caps()
164 if (mdsc->caps_avail_count >= need) in ceph_reserve_caps()
165 have = need; in ceph_reserve_caps()
175 for (i = have; i < need; i++) { in ceph_reserve_caps()
183 if (have + alloc != need) in ceph_reserve_caps()
185 ctx, need, have + alloc); in ceph_reserve_caps()
197 ctx->count = need; in ceph_reserve_caps()
2102 static int try_get_cap_refs(struct ceph_inode_info *ci, int need, int want, in try_get_cap_refs() argument
2111 ceph_cap_string(need), ceph_cap_string(want)); in try_get_cap_refs()
2117 if ((file_wanted & need) == 0) { in try_get_cap_refs()
2119 ceph_cap_string(need), ceph_cap_string(file_wanted)); in try_get_cap_refs()
2134 if (have & need & CEPH_CAP_FILE_WR) { in try_get_cap_refs()
2154 if ((have & need) == need) { in try_get_cap_refs()
2161 int not = want & ~(have & need); in try_get_cap_refs()
2167 *got = need | (have & want); in try_get_cap_refs()
2173 if ((need & CEPH_CAP_FILE_WR) && ci->i_auth_cap) { in try_get_cap_refs()
2181 inode, ceph_cap_string(need), ci->i_auth_cap->mds); in try_get_cap_refs()
2188 ceph_cap_string(have), ceph_cap_string(need)); in try_get_cap_refs()
2231 int ceph_get_caps(struct ceph_inode_info *ci, int need, int want, in ceph_get_caps() argument
2242 try_get_cap_refs(ci, need, want, endoff, in ceph_get_caps()