Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1539755
| From | Al Viro <viro@ZenIV.linux.org.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 4/5] 9p: introduce async read requests |
| Date | 2016-12-10 03:00 +0100 |
| Message-ID | <sMF7b-2hy-3@gated-at.bofh.it> (permalink) |
| References | <sMdXk-2rQ-3@gated-at.bofh.it> <sMdXk-2rQ-5@gated-at.bofh.it> <sMdXk-2rQ-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Dec 08, 2016 at 12:59:05PM -0800, Stefano Stabellini wrote:
> + } else {
> + req = p9_client_get_req(clnt, P9_TREAD, "dqd", fid->fid, offset, rsize);
> + if (IS_ERR(req)) {
> + *err = PTR_ERR(req);
> + break;
> + }
> + req->rsize = iov_iter_get_pages_alloc(to, &req->pagevec,
> + (size_t)rsize, &req->offset);
> + req->kiocb = iocb;
> + for (i = 0; i < req->rsize; i += PAGE_SIZE)
> + page_cache_get_speculative(req->pagevec[i/PAGE_SIZE]);
> + req->callback = p9_client_read_complete;
> +
> + *err = clnt->trans_mod->request(clnt, req);
> + if (*err < 0) {
> + clnt->status = Disconnected;
> + release_pages(req->pagevec,
> + (req->rsize + PAGE_SIZE - 1) / PAGE_SIZE,
> + true);
> + kvfree(req->pagevec);
> + p9_free_req(clnt, req);
> + break;
> + }
> +
> + *err = -EIOCBQUEUED;
IDGI. AFAICS, your code will result in shitloads of short reads - every
time when you give it a multi-iovec array, only the first one will be
issued and the rest won't be even looked at. Sure, it is technically
legal, but I very much doubt that aio users will be happy with that.
What am I missing here?
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 4/5] 9p: introduce async read requests Stefano Stabellini <sstabellini@kernel.org> - 2016-12-08 22:00 +0100
Re: [V9fs-developer] [PATCH 4/5] 9p: introduce async read requests Dominique Martinet <dominique.martinet@cea.fr> - 2016-12-09 08:30 +0100
Re: [V9fs-developer] [PATCH 4/5] 9p: introduce async read requests Stefano Stabellini <sstabellini@kernel.org> - 2016-12-09 23:30 +0100
Re: [PATCH 4/5] 9p: introduce async read requests Al Viro <viro@ZenIV.linux.org.uk> - 2016-12-10 03:00 +0100
Re: [PATCH 4/5] 9p: introduce async read requests Stefano Stabellini <sstabellini@kernel.org> - 2016-12-13 02:20 +0100
Re: [PATCH 4/5] 9p: introduce async read requests Latchesar Ionkov <lucho@ionkov.net> - 2016-12-13 15:30 +0100
csiph-web