On Wed, Sep 03, 2014 at 02:10:23PM +0400, Maxim Patlasov wrote:Yes, you are right. I missed that c7f3888ad7f0 fixed a subtle bug in get_pages_iovec().
Hi,Hmm, instead of reverting to passing maxbytes *instead* of maxpages, I think the
The patchset fixes a regression introduced by the following commits:
c7f3888ad7f0 ("switch iov_iter_get_pages() to passing maximal number of pages")
c9c37e2e6378 ("fuse: switch to iov_iter_get_pages()")
right fix is to *add* the maxbytes argument.
Just maxbytes alone doesn't have enough information in it. E.g. 4096 contiguous
bytes could occupy 1 or 2 pages, depending on the starting offset.
Your patch works fine in my tests.
So how about the following (untested) patch?