<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/mm/iov_iter.c, branch linux-3.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2014-11-13T18:28:55Z</updated>
<entry>
<title>Fix thinko in iov_iter_single_seg_count</title>
<updated>2014-11-13T18:28:55Z</updated>
<author>
<name>Paul Mackerras</name>
</author>
<published>2014-11-13T09:15:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ad0eab9293485d1c06237e9249f6d4dfa3d93d4d'/>
<id>urn:sha1:ad0eab9293485d1c06237e9249f6d4dfa3d93d4d</id>
<content type='text'>
The branches of the if (i-&gt;type &amp; ITER_BVEC) statement in
iov_iter_single_seg_count() are the wrong way around; if ITER_BVEC is
clear then we use i-&gt;bvec, when we should be using i-&gt;iov.  This fixes
it.

In my case, the symptom that this caused was that a KVM guest doing
filesystem operations on a virtual disk would result in one of qemu's
threads on the host going into an infinite loop in
generic_perform_write().  The loop would hit the copied == 0 case and
call iov_iter_single_seg_count() to reduce the number of bytes to try
to process, but because of the error, iov_iter_single_seg_count()
would just return i-&gt;count and the loop made no progress and continued
forever.

Cc: stable@vger.kernel.org # 3.16+
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>Add copy_to_iter(), copy_from_iter() and iov_iter_zero()</title>
<updated>2014-10-09T06:39:03Z</updated>
<author>
<name>Matthew Wilcox</name>
</author>
<published>2014-08-01T13:27:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c35e02480014f7a86e264a2fda39a568690163da'/>
<id>urn:sha1:c35e02480014f7a86e264a2fda39a568690163da</id>
<content type='text'>
For DAX, we want to be able to copy between iovecs and kernel addresses
that don't necessarily have a struct page.  This is a fairly simple
rearrangement for bvec iters to kmap the pages outside and pass them in,
but for user iovecs it gets more complicated because we might try various
different ways to kmap the memory.  Duplicating the existing logic works
out best in this case.

We need to be able to write zeroes to an iovec for reads from unwritten
ranges in a file.  This is performed by the new iov_iter_zero() function,
again patterned after the existing code that handles iovec iterators.

[AV: and export the buggers...]

Signed-off-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>fuse: honour max_read and max_write in direct_io mode</title>
<updated>2014-09-27T01:16:51Z</updated>
<author>
<name>Miklos Szeredi</name>
</author>
<published>2014-09-24T15:09:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2c80929c4c4d54e568b07ab85877d5fd38f4b02f'/>
<id>urn:sha1:2c80929c4c4d54e568b07ab85877d5fd38f4b02f</id>
<content type='text'>
The third argument of fuse_get_user_pages() "nbytesp" refers to the number of
bytes a caller asked to pack into fuse request. This value may be lesser
than capacity of fuse request or iov_iter.  So fuse_get_user_pages() must
ensure that *nbytesp won't grow.

Now, when helper iov_iter_get_pages() performs all hard work of extracting
pages from iov_iter, it can be done by passing properly calculated
"maxsize" to the helper.

The other caller of iov_iter_get_pages() (dio_refill_pages()) doesn't need
this capability, so pass LONG_MAX as the maxsize argument here.

Fixes: c9c37e2e6378 ("fuse: switch to iov_iter_get_pages()")
Reported-by: Werner Baumann &lt;werner.baumann@onlinehome.de&gt;
Tested-by: Maxim Patlasov &lt;mpatlasov@parallels.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>switch iov_iter_get_pages() to passing maximal number of pages</title>
<updated>2014-08-07T18:40:11Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2014-06-19T00:34:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c7f3888ad7f0932a87fb76e6e4edff2a90cc7920'/>
<id>urn:sha1:c7f3888ad7f0932a87fb76e6e4edff2a90cc7920</id>
<content type='text'>
... instead of maximal size.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>bio_vec-backed iov_iter</title>
<updated>2014-05-06T21:39:45Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2014-04-05T03:12:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=62a8067a7f35dba2de501c9cb00e4cf36da90bc0'/>
<id>urn:sha1:62a8067a7f35dba2de501c9cb00e4cf36da90bc0</id>
<content type='text'>
New variant of iov_iter - ITER_BVEC in iter-&gt;type, backed with
bio_vec array instead of iovec one.  Primitives taught to deal
with such beasts, __swap_write() switched to using that kind
of iov_iter.

Note that bio_vec is just a &lt;page, offset, length&gt; triple - there's
nothing block-specific about it.  I've left the definition where it
was, but took it from under ifdef CONFIG_BLOCK.

Next target: -&gt;splice_write()...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>optimize copy_page_{to,from}_iter()</title>
<updated>2014-05-06T21:39:45Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2014-04-04T23:23:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=81055e584f9d743cb13dc7944923d817c20f089d'/>
<id>urn:sha1:81055e584f9d743cb13dc7944923d817c20f089d</id>
<content type='text'>
if we'd ended up in the end of a segment, jump to the
beginning of the next one (iov_offset = 0, iov++),
rather than having the next primitive deal with that.

Ought to be folded back...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>new helper: copy_page_from_iter()</title>
<updated>2014-05-06T21:39:42Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2014-04-03T19:05:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f0d1bec9d58d4c038d0ac958c9af82be6eb18045'/>
<id>urn:sha1:f0d1bec9d58d4c038d0ac958c9af82be6eb18045</id>
<content type='text'>
parallel to copy_page_to_iter().  pipe_write() switched to it (and became
-&gt;write_iter()).

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>new helper: iov_iter_get_pages_alloc()</title>
<updated>2014-05-06T21:32:53Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2014-03-21T08:58:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=91f79c43d1b54d7154b118860d81b39bad07dfff'/>
<id>urn:sha1:91f79c43d1b54d7154b118860d81b39bad07dfff</id>
<content type='text'>
same as iov_iter_get_pages(), except that pages array is allocated
(kmalloc if possible, vmalloc if that fails) and left for caller to
free.  Lustre and NFS -&gt;direct_IO() switched to it.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>new helper: iov_iter_npages()</title>
<updated>2014-05-06T21:32:52Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2014-03-19T05:16:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f67da30c1d5fc9e341bc8121708874bfd7b31e45'/>
<id>urn:sha1:f67da30c1d5fc9e341bc8121708874bfd7b31e45</id>
<content type='text'>
counts the pages covered by iov_iter, up to given limit.
do_block_direct_io() and fuse_iter_npages() switched to
it.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>new helper: iov_iter_get_pages()</title>
<updated>2014-05-06T21:32:50Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2014-03-15T08:05:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7b2c99d15559e285384c742db52316802e24b0bd'/>
<id>urn:sha1:7b2c99d15559e285384c742db52316802e24b0bd</id>
<content type='text'>
iov_iter_get_pages(iter, pages, maxsize, &amp;start) grabs references pinning
the pages of up to maxsize of (contiguous) data from iter.  Returns the
amount of memory grabbed or -error.  In case of success, the requested
area begins at offset start in pages[0] and runs through pages[1], etc.
Less than requested amount might be returned - either because the contiguous
area in the beginning of iterator is smaller than requested, or because
the kernel failed to pin that many pages.

direct-io.c switched to using iov_iter_get_pages()

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
