Lines Matching defs:need

201 		      struct ceph_cap_reservation *ctx, int need)
213 dout("reserve caps ctx=%p need=%d\n", ctx, need);
217 if (mdsc->caps_avail_count >= need)
218 have = need;
228 for (i = have; i < need; ) {
245 max_caps = s->s_nr_caps - (need - i);
257 if (mdsc->caps_avail_count >= need - i)
258 more_have = need - i;
273 pr_warn("reserve caps ctx=%p ENOMEM need=%d got=%d\n",
274 ctx, need, have + alloc);
280 BUG_ON(have + alloc != need);
281 ctx->count = need;
1347 * the arg struct with the parameters that will need to be sent. This should
1378 * the weird transition from buffered to sync IO... we need to flush
1554 * we need to wait for sync writes to complete and for dirty
2010 * If we no longer need to hold onto old our caps, and we may
2045 * If we have an auth cap, we don't need to consider any
2442 * can recover size and mtime, so we don't need to
2711 * minimal set we @need. Also include the larger offset we are writing
2718 * -EAGAIN: need to sleep but non-blocking is specified
2728 static int try_get_cap_refs(struct inode *inode, int need, int want,
2737 dout("get_cap_refs %p need %s want %s\n", inode,
2738 ceph_cap_string(need), ceph_cap_string(want));
2763 if (have & need & CEPH_CAP_FILE_WR) {
2781 if ((have & need) == need) {
2788 int not = want & ~(have & need);
2796 (need & CEPH_CAP_FILE_WR)) {
2815 *got = need | want;
2817 *got = need;
2819 (need & CEPH_CAP_FILE_RD) &&
2829 (need & (CEPH_CAP_FILE_WR | CEPH_CAP_FILE_EXCL))) {
2836 dout("get_cap_refs %p need %s but mds%d readonly\n",
2837 inode, ceph_cap_string(need), ci->i_auth_cap->mds);
2848 if (need & ~mds_wanted) {
2849 dout("get_cap_refs %p need %s > mds_wanted %s\n",
2850 inode, ceph_cap_string(need),
2856 dout("get_cap_refs %p have %s need %s\n", inode,
2857 ceph_cap_string(have), ceph_cap_string(need));
2887 /* do we need to explicitly request a larger max_size? */
2915 int ceph_try_get_caps(struct inode *inode, int need, int want,
2920 BUG_ON(need & ~CEPH_CAP_FILE_RD);
2924 if (need) {
2925 ret = ceph_pool_perm_check(inode, need);
2930 flags = get_used_fmode(need | want);
2934 ret = try_get_cap_refs(inode, need, want, 0, flags, got);
2946 int ceph_get_caps(struct file *filp, int need, int want,
2955 ret = ceph_pool_perm_check(inode, need);
2963 flags = get_used_fmode(need | want);
2970 ret = try_get_cap_refs(inode, need, want, endoff,
2980 cw.need = need;
2992 while (!(ret = try_get_cap_refs(inode, need, want,
3094 * we don't need to send FLUSHSNAP message for it.
4455 * we may need to release capabilities to the MDS (or schedule