<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/splice.c, branch v2.6.18</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>[PATCH] splice: fix problems with sys_tee()</title>
<updated>2006-07-10T09:00:01+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@suse.de</email>
</author>
<published>2006-07-10T09:00:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=aadd06e5c56b9ff5117ec77e59eada43dc46e2fc'/>
<id>aadd06e5c56b9ff5117ec77e59eada43dc46e2fc</id>
<content type='text'>
Several issues noticed/fixed:

- We cannot reliably block in link_pipe() while holding both input and output
  mutexes. So do preparatory checks before locking down both mutexes and doing
  the link.

- The ipipe-&gt;nrbufs vs i check was bad, because we could have dropped the
  ipipe lock in-between. This causes us to potentially look at unknown
  buffers if we were racing with someone else reading this pipe.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Several issues noticed/fixed:

- We cannot reliably block in link_pipe() while holding both input and output
  mutexes. So do preparatory checks before locking down both mutexes and doing
  the link.

- The ipipe-&gt;nrbufs vs i check was bad, because we could have dropped the
  ipipe lock in-between. This causes us to potentially look at unknown
  buffers if we were racing with someone else reading this pipe.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] splice: retrieve mapping after locking the page</title>
<updated>2006-06-23T15:10:39+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@suse.de</email>
</author>
<published>2006-06-20T13:01:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9e94cd4fd1812bab45237f998b3c6fa1b24023fd'/>
<id>9e94cd4fd1812bab45237f998b3c6fa1b24023fd</id>
<content type='text'>
Otherwise we could be racing with truncate/mapping removal.

Problem found/fixed by Nick Piggin &lt;npiggin@suse.de&gt;, logic rewritten
by me.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Otherwise we could be racing with truncate/mapping removal.

Problem found/fixed by Nick Piggin &lt;npiggin@suse.de&gt;, logic rewritten
by me.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] splice: redo page lookup if add_to_page_cache() returns -EEXIST</title>
<updated>2006-05-04T04:55:12+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@suse.de</email>
</author>
<published>2006-05-03T08:58:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a0548871ed267ae12eb1c860c5aaebd9e466b34e'/>
<id>a0548871ed267ae12eb1c860c5aaebd9e466b34e</id>
<content type='text'>
This can happen quite easily, if several processes are trying to splice
the same file at the same time. It's not a failure, it just means someone
raced with us in allocating this file page. So just dump the allocated
page and relookup the original.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This can happen quite easily, if several processes are trying to splice
the same file at the same time. It's not a failure, it just means someone
raced with us in allocating this file page. So just dump the allocated
page and relookup the original.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] splice: rename remaining info variables to pipe</title>
<updated>2006-05-04T04:55:12+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@suse.de</email>
</author>
<published>2006-05-03T08:41:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=76ad4d11105ccd40a536db1057083f28326019fd'/>
<id>76ad4d11105ccd40a536db1057083f28326019fd</id>
<content type='text'>
Same thing was done in fs/pipe.c and most of fs/splice.c, but we had
a few missing still.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Same thing was done in fs/pipe.c and most of fs/splice.c, but we had
a few missing still.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] splice: LRU fixups</title>
<updated>2006-05-04T04:55:12+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@suse.de</email>
</author>
<published>2006-05-03T08:35:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1432873af7ae29d4bb3c56114c05b539d078ca62'/>
<id>1432873af7ae29d4bb3c56114c05b539d078ca62</id>
<content type='text'>
Nick says that the current construct isn't safe. This goes back to the
original, but sets PIPE_BUF_FLAG_LRU on user pages as well as they all
seem to be on the LRU in the first place.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Nick says that the current construct isn't safe. This goes back to the
original, but sets PIPE_BUF_FLAG_LRU on user pages as well as they all
seem to be on the LRU in the first place.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] splice: fix unlocking of page on error -&gt;prepare_write()</title>
<updated>2006-05-04T04:55:12+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@suse.de</email>
</author>
<published>2006-05-03T08:35:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=bfc4ee39fdbb2deb8864785d5e5bc5cdd3b31a69'/>
<id>bfc4ee39fdbb2deb8864785d5e5bc5cdd3b31a69</id>
<content type='text'>
Looking at generic_file_buffered_write(), we need to unlock_page() if
prepare write fails and it isn't due to racing with truncate().

Also trim the size if -&gt;prepare_write() fails, if we have to.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Looking at generic_file_buffered_write(), we need to unlock_page() if
prepare write fails and it isn't due to racing with truncate().

Also trim the size if -&gt;prepare_write() fails, if we have to.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] vmsplice: restrict stealing a little more</title>
<updated>2006-05-02T13:29:57+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@suse.de</email>
</author>
<published>2006-05-02T13:29:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=330ab71619bacc4d4494227a6cfc9b7f5500403d'/>
<id>330ab71619bacc4d4494227a6cfc9b7f5500403d</id>
<content type='text'>
Apply the same rules as the anon pipe pages, only allow stealing
if no one else is using the page.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Apply the same rules as the anon pipe pages, only allow stealing
if no one else is using the page.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] splice: fix page LRU accounting</title>
<updated>2006-05-02T13:03:27+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@suse.de</email>
</author>
<published>2006-05-02T13:03:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a893b99be71f1d669b74f840e3a683dd077d007b'/>
<id>a893b99be71f1d669b74f840e3a683dd077d007b</id>
<content type='text'>
Currently we rely on the PIPE_BUF_FLAG_LRU flag being set correctly
to know whether we need to fiddle with page LRU state after stealing it,
however for some origins we just don't know if the page is on the LRU
list or not.

So remove PIPE_BUF_FLAG_LRU and do this check/add manually in pipe_to_file()
instead.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently we rely on the PIPE_BUF_FLAG_LRU flag being set correctly
to know whether we need to fiddle with page LRU state after stealing it,
however for some origins we just don't know if the page is on the LRU
list or not.

So remove PIPE_BUF_FLAG_LRU and do this check/add manually in pipe_to_file()
instead.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] vmsplice: fix badly placed end paranthesis</title>
<updated>2006-05-02T10:57:18+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@suse.de</email>
</author>
<published>2006-05-02T10:57:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7591489a8fbee83f19bacc75756989a6a4d0389c'/>
<id>7591489a8fbee83f19bacc75756989a6a4d0389c</id>
<content type='text'>
We need to use the minium of {len, PAGE_SIZE-off}, not {len, PAGE_SIZE}-off.
The latter doesn't make any sense, and could cause us to attempt negative
length transfers...

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We need to use the minium of {len, PAGE_SIZE-off}, not {len, PAGE_SIZE}-off.
The latter doesn't make any sense, and could cause us to attempt negative
length transfers...

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] vmsplice: allow user to pass in gift pages</title>
<updated>2006-05-01T18:02:33+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@suse.de</email>
</author>
<published>2006-05-01T18:02:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7afa6fd037e51e95d322990cb127bb2b1217251a'/>
<id>7afa6fd037e51e95d322990cb127bb2b1217251a</id>
<content type='text'>
If SPLICE_F_GIFT is set, the user is basically giving this pages away to
the kernel. That means we can steal them for eg page cache uses instead
of copying it.

The data must be properly page aligned and also a multiple of the page size
in length.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If SPLICE_F_GIFT is set, the user is basically giving this pages away to
the kernel. That means we can steal them for eg page cache uses instead
of copying it.

The data must be properly page aligned and also a multiple of the page size
in length.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
