Lines Matching defs:imu
891 struct io_mapped_ubuf *imu;
3013 req->imu = NULL;
3023 req->imu = ctx->user_bufs[index];
3114 struct io_mapped_ubuf *imu)
3123 if (unlikely(buf_addr < imu->ubuf || buf_end > imu->ubuf_end))
3130 offset = buf_addr - imu->ubuf;
3131 iov_iter_bvec(iter, rw, imu->bvec, imu->nr_bvecs, offset + len);
3150 const struct bio_vec *bvec = imu->bvec;
3173 if (WARN_ON_ONCE(!req->imu))
3175 return __io_import_fixed(req, rw, iter, req->imu);
8901 struct io_mapped_ubuf *imu = *slot;
8904 if (imu != ctx->dummy_ubuf) {
8905 for (i = 0; i < imu->nr_bvecs; i++)
8906 unpin_user_page(imu->bvec[i].bv_page);
8907 if (imu->acct_pages)
8908 io_unaccount_mem(ctx, imu->acct_pages);
8909 kvfree(imu);
9002 struct io_mapped_ubuf *imu = ctx->user_bufs[i];
9004 for (j = 0; j < imu->nr_bvecs; j++) {
9005 if (!PageCompound(imu->bvec[j].bv_page))
9007 if (compound_head(imu->bvec[j].bv_page) == hpage)
9016 int nr_pages, struct io_mapped_ubuf *imu,
9021 imu->acct_pages = 0;
9024 imu->acct_pages++;
9034 imu->acct_pages += page_size(hpage) >> PAGE_SHIFT;
9038 if (!imu->acct_pages)
9041 ret = io_account_mem(ctx, imu->acct_pages);
9043 imu->acct_pages = 0;
9051 struct io_mapped_ubuf *imu = NULL;
9080 imu = kvmalloc(struct_size(imu, bvec, nr_pages), GFP_KERNEL);
9081 if (!imu)
9118 ret = io_buffer_account_pin(ctx, pages, pret, imu, last_hpage);
9130 imu->bvec[i].bv_page = pages[i];
9131 imu->bvec[i].bv_len = vec_len;
9132 imu->bvec[i].bv_offset = off;
9137 imu->ubuf = ubuf;
9138 imu->ubuf_end = ubuf + iov->iov_len;
9139 imu->nr_bvecs = nr_pages;
9140 *pimu = imu;
9144 kvfree(imu);
9249 struct io_mapped_ubuf *imu;
9267 err = io_sqe_buffer_register(ctx, &iov, &imu, &last_hpage);
9276 io_buffer_unmap(ctx, &imu);
9283 ctx->user_bufs[i] = imu;