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()
2299 static int try_get_cap_refs(struct ceph_inode_info *ci, int need, int want, in try_get_cap_refs() argument
2310 ceph_cap_string(need), ceph_cap_string(want)); in try_get_cap_refs()
2317 if ((file_wanted & need) == 0) { in try_get_cap_refs()
2319 ceph_cap_string(need), ceph_cap_string(file_wanted)); in try_get_cap_refs()
2338 if (have & need & CEPH_CAP_FILE_WR) { in try_get_cap_refs()
2358 if ((have & need) == need) { in try_get_cap_refs()
2365 int not = want & ~(have & need); in try_get_cap_refs()
2373 (need & CEPH_CAP_FILE_WR)) { in try_get_cap_refs()
2392 *got = need | (have & want); in try_get_cap_refs()
2398 if ((need & CEPH_CAP_FILE_WR) && ci->i_auth_cap) { in try_get_cap_refs()
2406 inode, ceph_cap_string(need), ci->i_auth_cap->mds); in try_get_cap_refs()
2421 ceph_cap_string(have), ceph_cap_string(need)); in try_get_cap_refs()
2466 int ceph_get_caps(struct ceph_inode_info *ci, int need, int want, in ceph_get_caps() argument
2471 ret = ceph_pool_perm_check(ci, need); in ceph_get_caps()
2481 ret = try_get_cap_refs(ci, need, want, endoff, in ceph_get_caps()
2490 try_get_cap_refs(ci, need, want, endoff, in ceph_get_caps()