+ ring_nr = td->o.iodepth;
+ if (ring_nr & (ring_nr - 1))
+ ring_nr = 1 << __fls(ring_nr);
+
+ ring_size = sizeof(struct syslet_ring) +
+ ring_nr * sizeof(struct syslet_completion);
+ if (posix_memalign(&ring, sizeof(uint64_t), ring_size))
+ goto err_mem;
+ if (posix_memalign(&stack, page_size, page_size))
+ goto err_mem;
+
+ sd->ring = ring;
+ sd->ring_mask = ring_nr - 1;
+ sd->stack = stack;
+
+ memset(sd->ring, 0, ring_size);
+ sd->ring->elements = ring_nr;
+
+ if (!check_syslet_support(sd)) {
+ td->io_ops->data = sd;
+ return 0;