bool fuse_uring_request_expired(struct fuse_conn *fc)
{
- struct fuse_ring *ring = fc->ring;
+ struct fuse_ring *ring = fc->chan->ring;
struct fuse_ring_queue *queue;
int qid;
void fuse_uring_destruct(struct fuse_conn *fc)
{
- struct fuse_ring *ring = fc->ring;
+ struct fuse_ring *ring = fc->chan->ring;
int qid;
if (!ring)
kfree(ring->queues);
kfree(ring);
- fc->ring = NULL;
+ fc->chan->ring = NULL;
}
/*
struct fuse_ring *res = NULL;
size_t max_payload_size;
- ring = kzalloc_obj(*fc->ring, GFP_KERNEL_ACCOUNT);
+ ring = kzalloc_obj(*fc->chan->ring, GFP_KERNEL_ACCOUNT);
if (!ring)
return NULL;
spin_unlock(&fc->lock);
goto out_err;
}
- if (fc->ring) {
+ if (fc->chan->ring) {
/* race, another thread created the ring in the meantime */
spin_unlock(&fc->lock);
- res = fc->ring;
+ res = fc->chan->ring;
goto out_err;
}
ring->nr_queues = nr_queues;
ring->fc = fc;
ring->max_payload_sz = max_payload_size;
- smp_store_release(&fc->ring, ring);
+ smp_store_release(&fc->chan->ring, ring);
spin_unlock(&fc->lock);
return ring;
struct fuse_uring_cmd_req);
struct fuse_ring_ent *ent;
int err;
- struct fuse_ring *ring = fc->ring;
+ struct fuse_ring *ring = fc->chan->ring;
struct fuse_ring_queue *queue;
uint64_t commit_id = READ_ONCE(cmd_req->commit_id);
unsigned int qid = READ_ONCE(cmd_req->qid);
{
const struct fuse_uring_cmd_req *cmd_req = io_uring_sqe128_cmd(cmd->sqe,
struct fuse_uring_cmd_req);
- struct fuse_ring *ring = smp_load_acquire(&fc->ring);
+ struct fuse_ring *ring = smp_load_acquire(&fc->chan->ring);
struct fuse_ring_queue *queue;
struct fuse_ring_ent *ent;
int err;
fc = fud->fc;
/* Once a connection has io-uring enabled on it, it can't be disabled */
- if (!enable_uring && !fc->io_uring) {
+ if (!enable_uring && !fc->chan->io_uring) {
pr_info_ratelimited("fuse-io-uring is disabled\n");
return -EOPNOTSUPP;
}
if (err) {
pr_info_once("FUSE_IO_URING_CMD_REGISTER failed err=%d\n",
err);
- fc->io_uring = 0;
+ fc->chan->io_uring = 0;
wake_up_all(&fc->chan->blocked_waitq);
return err;
}
void fuse_uring_queue_fuse_req(struct fuse_iqueue *fiq, struct fuse_req *req)
{
struct fuse_conn *fc = req->fm->fc;
- struct fuse_ring *ring = fc->ring;
+ struct fuse_ring *ring = fc->chan->ring;
struct fuse_ring_queue *queue;
struct fuse_ring_ent *ent = NULL;
int err;
bool fuse_uring_queue_bq_req(struct fuse_req *req)
{
struct fuse_conn *fc = req->fm->fc;
- struct fuse_ring *ring = fc->ring;
+ struct fuse_ring *ring = fc->chan->ring;
struct fuse_ring_queue *queue;
struct fuse_ring_ent *ent = NULL;
static inline void fuse_uring_abort(struct fuse_conn *fc)
{
- struct fuse_ring *ring = fc->ring;
+ struct fuse_ring *ring = fc->chan->ring;
if (ring == NULL)
return;
static inline void fuse_uring_wait_stopped_queues(struct fuse_conn *fc)
{
- struct fuse_ring *ring = fc->ring;
+ struct fuse_ring *ring = fc->chan->ring;
if (ring)
wait_event(ring->stop_waitq,
static inline bool fuse_uring_ready(struct fuse_conn *fc)
{
- struct fuse_ring *ring = READ_ONCE(fc->ring);
+ struct fuse_ring *ring = READ_ONCE(fc->chan->ring);
return ring && smp_load_acquire(&ring->ready);
}
/* Is synchronous FUSE_INIT allowed? */
unsigned int sync_init:1;
- /* Use io_uring for communication */
- unsigned int io_uring;
-
/** Maximum stack depth for passthrough backing files */
int max_stack_depth;
struct idr backing_files_map;
#endif
-#ifdef CONFIG_FUSE_IO_URING
- /** uring connection information*/
- struct fuse_ring *ring;
-#endif
-
/** Only used if the connection opts into request timeouts */
struct {
/* Worker for checking if any requests have timed out */