Re: [git pull] vfs fix

From: Al Viro
Date: Sat Nov 26 2016 - 21:51:57 EST

On Sun, Nov 27, 2016 at 02:25:09AM +0000, Al Viro wrote:

> Anyway, leaving that BUG_ON() had been wrong; I can send a followup
> massaging that thing as you've suggested, if you are interested in
> that. But keep in mind that the whole iov_iter_get_pages...() calling
> conventions are going to be changed, hopefully soon.

BTW, speaking of iov_iter_get_pages_alloc() callers and splice:
"ceph: combine as many iovec as possile into one OSD request" has added
static size_t dio_get_pagev_size(const struct iov_iter *it)
const struct iovec *iov = it->iov;
const struct iovec *iovend = iov + it->nr_segs;
size_t size;

size = iov->iov_len - it->iov_offset;
* An iov can be page vectored when both the current tail
* and the next base are page aligned.
while (PAGE_ALIGNED((iov->iov_base + iov->iov_len)) &&
(++iov < iovend && PAGE_ALIGNED((iov->iov_base)))) {
size += iov->iov_len;
dout("dio_get_pagevlen len = %zu\n", size);
return size;

... with 'it' possibly being bio_vec-backed iterator. Could somebody
explain what that code is trying to do?

I would really like to hear details - I'm not saying that the goal mentioned
in the commit message is worthless, but I don't know ceph codebase well
enough to tell what would be a good way to implement that. In its current
form it's obviously broken.