jfs: logmgr: use __bio_add_page to add single page to bio
[linux-block.git] / io_uring / io_uring.h
index 25515d69d2055864a96ab29f917c98d5a6bb29b4..259bf798a390eea2e6aa2f82d41b701615c050ca 100644 (file)
@@ -394,4 +394,14 @@ static inline void io_req_queue_tw_complete(struct io_kiocb *req, s32 res)
        io_req_task_work_add(req);
 }
 
+/*
+ * IORING_SETUP_SQE128 contexts allocate twice the normal SQE size for each
+ * slot.
+ */
+static inline size_t uring_sqe_size(struct io_ring_ctx *ctx)
+{
+       if (ctx->flags & IORING_SETUP_SQE128)
+               return 2 * sizeof(struct io_uring_sqe);
+       return sizeof(struct io_uring_sqe);
+}
 #endif