Lines Matching refs:imu
2865 struct io_mapped_ubuf *imu; in io_import_fixed() local
2873 imu = &ctx->user_bufs[index]; in io_import_fixed()
2880 if (buf_addr < imu->ubuf || buf_addr + len > imu->ubuf + imu->len) in io_import_fixed()
2887 offset = buf_addr - imu->ubuf; in io_import_fixed()
2888 iov_iter_bvec(iter, rw, imu->bvec, imu->nr_bvecs, offset + len); in io_import_fixed()
2907 const struct bio_vec *bvec = imu->bvec; in io_import_fixed()
7986 struct io_mapped_ubuf *imu = &ctx->user_bufs[i]; in io_sqe_buffer_unregister() local
7988 for (j = 0; j < imu->nr_bvecs; j++) in io_sqe_buffer_unregister()
7989 unpin_user_page(imu->bvec[j].bv_page); in io_sqe_buffer_unregister()
7991 if (imu->acct_pages) in io_sqe_buffer_unregister()
7992 io_unaccount_mem(ctx, imu->acct_pages, ACCT_PINNED); in io_sqe_buffer_unregister()
7993 kvfree(imu->bvec); in io_sqe_buffer_unregister()
7994 imu->nr_bvecs = 0; in io_sqe_buffer_unregister()
8052 struct io_mapped_ubuf *imu = &ctx->user_bufs[i]; in headpage_already_acct() local
8054 for (j = 0; j < imu->nr_bvecs; j++) { in headpage_already_acct()
8055 if (!PageCompound(imu->bvec[j].bv_page)) in headpage_already_acct()
8057 if (compound_head(imu->bvec[j].bv_page) == hpage) in headpage_already_acct()
8066 int nr_pages, struct io_mapped_ubuf *imu, in io_buffer_account_pin() argument
8073 imu->acct_pages++; in io_buffer_account_pin()
8083 imu->acct_pages += page_size(hpage) >> PAGE_SHIFT; in io_buffer_account_pin()
8087 if (!imu->acct_pages) in io_buffer_account_pin()
8090 ret = io_account_mem(ctx, imu->acct_pages, ACCT_PINNED); in io_buffer_account_pin()
8092 imu->acct_pages = 0; in io_buffer_account_pin()
8116 struct io_mapped_ubuf *imu = &ctx->user_bufs[i]; in io_sqe_buffer_register() local
8160 imu->bvec = kvmalloc_array(nr_pages, sizeof(struct bio_vec), in io_sqe_buffer_register()
8163 if (!imu->bvec) in io_sqe_buffer_register()
8193 kvfree(imu->bvec); in io_sqe_buffer_register()
8197 ret = io_buffer_account_pin(ctx, pages, pret, imu, &last_hpage); in io_sqe_buffer_register()
8200 kvfree(imu->bvec); in io_sqe_buffer_register()
8210 imu->bvec[j].bv_page = pages[j]; in io_sqe_buffer_register()
8211 imu->bvec[j].bv_len = vec_len; in io_sqe_buffer_register()
8212 imu->bvec[j].bv_offset = off; in io_sqe_buffer_register()
8217 imu->ubuf = ubuf; in io_sqe_buffer_register()
8218 imu->len = iov.iov_len; in io_sqe_buffer_register()
8219 imu->nr_bvecs = nr_pages; in io_sqe_buffer_register()