Lines Matching defs:need
205 struct ceph_cap_reservation *ctx, int need)
218 doutc(cl, "ctx=%p need=%d\n", ctx, need);
222 if (mdsc->caps_avail_count >= need)
223 have = need;
233 for (i = have; i < need; ) {
250 max_caps = s->s_nr_caps - (need - i);
262 if (mdsc->caps_avail_count >= need - i)
263 more_have = need - i;
278 pr_warn_client(cl, "ctx=%p ENOMEM need=%d got=%d\n", ctx, need,
285 BUG_ON(have + alloc != need);
286 ctx->count = need;
1499 * the arg struct with the parameters that will need to be sent. This should
1531 * the weird transition from buffered to sync IO... we need to flush
1767 * we need to wait for sync writes to complete and for dirty
2247 * If we no longer need to hold onto old our caps, and we may
2281 * If we have an auth cap, we don't need to consider any
2665 * can recover size and mtime, so we don't need to
2965 * minimal set we @need. Also include the larger offset we are writing
2972 * -EAGAIN: need to sleep but non-blocking is specified
2982 static int try_get_cap_refs(struct inode *inode, int need, int want,
2992 doutc(cl, "%p %llx.%llx need %s want %s\n", inode,
2993 ceph_vinop(inode), ceph_cap_string(need),
3024 if (have & need & CEPH_CAP_FILE_WR) {
3043 if ((have & need) == need) {
3050 * For RDCACHE|RD -> RD, there is not need to wait and we can
3053 int not = want & ~(have & need);
3062 (need & CEPH_CAP_FILE_WR)) {
3101 *got = need | (want & ~exclude &
3117 *got = need | (want & ~exclude);
3119 *got = need;
3127 (need & (CEPH_CAP_FILE_WR | CEPH_CAP_FILE_EXCL))) {
3134 doutc(cl, "%p %llx.%llx need %s but mds%d readonly\n",
3135 inode, ceph_vinop(inode), ceph_cap_string(need),
3148 if (need & ~mds_wanted) {
3149 doutc(cl, "%p %llx.%llx need %s > mds_wanted %s\n",
3150 inode, ceph_vinop(inode), ceph_cap_string(need),
3156 doutc(cl, "%p %llx.%llx have %s need %s\n", inode,
3158 ceph_cap_string(need));
3189 /* do we need to explicitly request a larger max_size? */
3227 int ceph_try_get_caps(struct inode *inode, int need, int want,
3232 BUG_ON(need & ~CEPH_CAP_FILE_RD);
3236 if (need) {
3237 ret = ceph_pool_perm_check(inode, need);
3242 flags = get_used_fmode(need | want);
3246 ret = try_get_cap_refs(inode, need, want, 0, flags, got);
3258 int __ceph_get_caps(struct inode *inode, struct ceph_file_info *fi, int need,
3265 ret = ceph_pool_perm_check(inode, need);
3273 flags = get_used_fmode(need | want);
3280 ret = try_get_cap_refs(inode, need, want, endoff,
3293 cw.need = need;
3306 while (!(ret = try_get_cap_refs(inode, need, want,
3404 int ceph_get_caps(struct file *filp, int need, int want, loff_t endoff,
3410 return __ceph_get_caps(inode, fi, need, want, endoff, got);
3427 * we don't need to send FLUSHSNAP message for it.
5138 * we may need to release capabilities to the MDS (or schedule