Lines Matching defs:fc
53 struct fuse_conn *fc = ring->fc;
56 lockdep_assert_held(&fc->bg_lock);
59 * Allow one bg request per queue, ignoring global fc limits.
64 while ((fc->active_background < fc->max_background ||
71 fc->active_background++;
83 struct fuse_conn *fc = ring->fc;
90 spin_lock(&fc->bg_lock);
92 spin_unlock(&fc->bg_lock);
124 struct fuse_conn *fc = ring->fc;
133 WARN_ON_ONCE(ring->fc->max_background != UINT_MAX);
135 spin_lock(&fc->bg_lock);
137 spin_unlock(&fc->bg_lock);
143 static bool ent_list_request_expired(struct fuse_conn *fc, struct list_head *list)
155 fc->timeout.req_timeout);
158 bool fuse_uring_request_expired(struct fuse_conn *fc)
160 struct fuse_ring *ring = fc->ring;
173 if (fuse_request_expired(fc, &queue->fuse_req_queue) ||
174 fuse_request_expired(fc, &queue->fuse_req_bg_queue) ||
175 ent_list_request_expired(fc, &queue->ent_w_req_queue) ||
176 ent_list_request_expired(fc, &queue->ent_in_userspace)) {
186 void fuse_uring_destruct(struct fuse_conn *fc)
188 struct fuse_ring *ring = fc->ring;
219 fc->ring = NULL;
225 static struct fuse_ring *fuse_uring_create(struct fuse_conn *fc)
232 ring = kzalloc(sizeof(*fc->ring), GFP_KERNEL_ACCOUNT);
241 max_payload_size = max(FUSE_MIN_READ_BUFFER, fc->max_write);
242 max_payload_size = max(max_payload_size, fc->max_pages * PAGE_SIZE);
244 spin_lock(&fc->lock);
245 if (fc->ring) {
247 spin_unlock(&fc->lock);
248 res = fc->ring;
255 ring->fc = fc;
257 smp_store_release(&fc->ring, ring);
259 spin_unlock(&fc->lock);
271 struct fuse_conn *fc = ring->fc;
299 spin_lock(&fc->lock);
301 spin_unlock(&fc->lock);
311 spin_unlock(&fc->lock);
537 struct fuse_conn *fc)
814 struct fuse_conn *fc = ring->fc;
824 err = fuse_uring_out_header_has_err(&req->out.h, req, fc);
875 struct fuse_conn *fc)
880 struct fuse_ring *ring = fc->ring;
899 if (!READ_ONCE(fc->connected) || READ_ONCE(queue->stopped))
982 struct fuse_conn *fc = ring->fc;
983 struct fuse_iqueue *fiq = &fc->iq;
998 wake_up_all(&fc->blocked_waitq);
1079 unsigned int issue_flags, struct fuse_conn *fc)
1082 struct fuse_ring *ring = smp_load_acquire(&fc->ring);
1090 ring = fuse_uring_create(fc);
1128 struct fuse_conn *fc;
1146 fc = fud->fc;
1149 if (!enable_uring && !fc->io_uring) {
1154 if (fc->aborted)
1156 if (!fc->connected)
1163 if (!fc->initialized)
1168 err = fuse_uring_register(cmd, issue_flags, fc);
1172 fc->io_uring = 0;
1173 wake_up_all(&fc->blocked_waitq);
1178 err = fuse_uring_commit_fetch(cmd, issue_flags, fc);
1260 struct fuse_conn *fc = req->fm->fc;
1261 struct fuse_ring *ring = fc->ring;
1304 struct fuse_conn *fc = req->fm->fc;
1305 struct fuse_ring *ring = fc->ring;
1325 spin_lock(&fc->bg_lock);
1326 fc->num_background++;
1327 if (fc->num_background == fc->max_background)
1328 fc->blocked = 1;
1330 spin_unlock(&fc->bg_lock);