<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/fuse/dev.c, branch v3.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2011-03-23T00:44:02Z</updated>
<entry>
<title>mm: add replace_page_cache_page() function</title>
<updated>2011-03-23T00:44:02Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2011-03-22T23:30:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ef6a3c63112e865d632ff7c478ba7c7160cad0d1'/>
<id>urn:sha1:ef6a3c63112e865d632ff7c478ba7c7160cad0d1</id>
<content type='text'>
This function basically does:

     remove_from_page_cache(old);
     page_cache_release(old);
     add_to_page_cache_locked(new);

Except it does this atomically, so there's no possibility for the "add" to
fail because of a race.

If memory cgroups are enabled, then the memory cgroup charge is also moved
from the old page to the new.

This function is currently used by fuse to move pages into the page cache
on read, instead of copying the page contents.

[minchan.kim@gmail.com: add freepage() hook to replace_page_cache_page()]
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Acked-by: Rik van Riel &lt;riel@redhat.com&gt;
Acked-by: KAMEZAWA Hiroyuki &lt;kamezawa.hiroyu@jp.fujitsu.com&gt;
Cc: Mel Gorman &lt;mel@csn.ul.ie&gt;
Signed-off-by: Minchan Kim &lt;minchan.kim@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fuse: wakeup pollers on connection release/abort</title>
<updated>2011-03-21T12:58:05Z</updated>
<author>
<name>Bryan Green</name>
<email>bryan@grid-net.com</email>
</author>
<published>2011-03-02T00:43:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=357ccf2b69bcefa650a54db83702381d1c9d6959'/>
<id>urn:sha1:357ccf2b69bcefa650a54db83702381d1c9d6959</id>
<content type='text'>
If a fuse dev connection is broken, wake up any
processes that are blocking, in a poll system call,
on one of the files in the now defunct filesystem.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
<entry>
<title>fuse: allow batching of FORGET requests</title>
<updated>2010-12-07T19:16:56Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2010-12-07T19:16:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=02c048b919455aaa38628563cdcc2e691c8a9f53'/>
<id>urn:sha1:02c048b919455aaa38628563cdcc2e691c8a9f53</id>
<content type='text'>
Terje Malmedal reports that a fuse filesystem with 32 million inodes
on a machine with lots of memory can take up to 30 minutes to process
FORGET requests when all those inodes are evicted from the icache.

To solve this, create a BATCH_FORGET request that allows up to about
8000 FORGET requests to be sent in a single message.

This request is only sent if userspace supports interface version 7.16
or later, otherwise fall back to sending individual FORGET messages.

Reported-by: Terje Malmedal &lt;terje.malmedal@usit.uio.no&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
<entry>
<title>fuse: separate queue for FORGET requests</title>
<updated>2010-12-07T19:16:56Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2010-12-07T19:16:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=07e77dca8a1f17a724a9b7449f0ca02e70e9d057'/>
<id>urn:sha1:07e77dca8a1f17a724a9b7449f0ca02e70e9d057</id>
<content type='text'>
Terje Malmedal reports that a fuse filesystem with 32 million inodes
on a machine with lots of memory can go unresponsive for up to 30
minutes when all those inodes are evicted from the icache.

The reason is that FORGET messages, sent when the inode is evicted,
are queued up together with regular filesystem requests, and while the
huge queue of FORGET messages are processed no other filesystem
operation can proceed.

Since a full fuse request structure is allocated for each inode, these
take up quite a bit of memory as well.

To solve these issues, create a slim 'fuse_forget_link' structure
containing just the minimum of information required to send the FORGET
request and chain these on a separate queue.

When userspace is asking for a request make sure that FORGET and
non-FORGET requests are selected fairly: for each 8 non-FORGET allow
16 FORGET requests.  This will make sure FORGETs do not pile up, yet
other requests are also allowed to proceed while the queued FORGETs
are processed.

Reported-by: Terje Malmedal &lt;terje.malmedal@usit.uio.no&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
<entry>
<title>fuse: use release_pages()</title>
<updated>2010-10-28T01:03:17Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2010-10-27T22:34:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0be8557bcd34887d5a42c01c5659cab5ecf99f13'/>
<id>urn:sha1:0be8557bcd34887d5a42c01c5659cab5ecf99f13</id>
<content type='text'>
Replace iterated page_cache_release() with release_pages(), which is
faster and shorter.

Needs release_pages() to be exported to modules.

Suggested-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fuse: use clear_highpage() and KM_USER0 instead of KM_USER1</title>
<updated>2010-10-26T23:52:13Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2010-10-26T21:22:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b6777c40c79168d938c30b5b7471fbd64bca109c'/>
<id>urn:sha1:b6777c40c79168d938c30b5b7471fbd64bca109c</id>
<content type='text'>
Commit 7909b1c640 ("fuse: don't use atomic kmap") removed KM_USER0 usage
from fuse/dev.c.  Switch KM_USER1 uses to KM_USER0 for clarity.  Also
replace open coded clear_highpage().

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Cc: Jan Beulich &lt;jbeulich@novell.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>use clear_page()/copy_page() in favor of memset()/memcpy() on whole pages</title>
<updated>2010-10-26T23:52:13Z</updated>
<author>
<name>Jan Beulich</name>
<email>JBeulich@novell.com</email>
</author>
<published>2010-10-26T21:22:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3ecb01df3261d3b1f02ccfcf8384e2a255d2a1d0'/>
<id>urn:sha1:3ecb01df3261d3b1f02ccfcf8384e2a255d2a1d0</id>
<content type='text'>
After all that's what they are intended for.

Signed-off-by: Jan Beulich &lt;jbeulich@novell.com&gt;
Cc: Miklos Szeredi &lt;miklos@szeredi.hu&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: "Rafael J. Wysocki" &lt;rjw@sisk.pl&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fuse: Initialize total_len in fuse_retrieve()</title>
<updated>2010-10-04T08:45:32Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2010-09-30T20:06:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0157443c56bcc50be4933ebdff3ece723dfd535c'/>
<id>urn:sha1:0157443c56bcc50be4933ebdff3ece723dfd535c</id>
<content type='text'>
fs/fuse/dev.c:1357: warning: ‘total_len’ may be used uninitialized in this
function

Initialize total_len to zero, else its value will be undefined.

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
<entry>
<title>fuse: fix lock annotations</title>
<updated>2010-09-07T11:42:41Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2010-09-07T11:42:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b9ca67b2ddf021491a3741d9555e8ff59b2175ba'/>
<id>urn:sha1:b9ca67b2ddf021491a3741d9555e8ff59b2175ba</id>
<content type='text'>
Sparse doesn't understand lock annotations of the form
__releases(&amp;foo-&gt;lock).  Change them to __releases(foo-&gt;lock).  Same
for __acquires().

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
<entry>
<title>fuse: flush background queue on connection close</title>
<updated>2010-09-07T11:42:41Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2010-09-07T11:42:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=595afaf9e6ee1b48e13ec4b8bcc8c7dee888161a'/>
<id>urn:sha1:595afaf9e6ee1b48e13ec4b8bcc8c7dee888161a</id>
<content type='text'>
David Bartly reported that fuse can hang in fuse_get_req_nofail() when
the connection to the filesystem server is no longer active.

If bg_queue is not empty then flush_bg_queue() called from
request_end() can put more requests on to the pending queue.  If this
happens while ending requests on the processing queue then those
background requests will be queued to the pending list and never
ended.

Another problem is that fuse_dev_release() didn't wake up processes
sleeping on blocked_waitq.

Solve this by:

 a) flushing the background queue before calling end_requests() on the
    pending and processing queues

 b) setting blocked = 0 and waking up processes waiting on
    blocked_waitq()

Thanks to David for an excellent bug report.

Reported-by: David Bartley &lt;andareed@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
CC: stable@kernel.org
</content>
</entry>
</feed>
