<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/fuse/dev.c, branch v3.4.11</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs/fuse/dev.c?h=v3.4.11</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs/fuse/dev.c?h=v3.4.11'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-09-14T17:00:32Z</updated>
<entry>
<title>fuse: fix retrieve length</title>
<updated>2012-09-14T17:00:32Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2012-09-04T16:45:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b4b55ff702c3551ba39ccec0b1dda9e3b57429be'/>
<id>urn:sha1:b4b55ff702c3551ba39ccec0b1dda9e3b57429be</id>
<content type='text'>
commit c9e67d483776d8d2a5f3f70491161b205930ffe1 upstream.

In some cases fuse_retrieve() would return a short byte count if offset was
non-zero.  The data returned was correct, though.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>fuse: remove the second argument of k[un]map_atomic()</title>
<updated>2012-03-20T13:48:22Z</updated>
<author>
<name>Cong Wang</name>
<email>amwang@redhat.com</email>
</author>
<published>2011-11-25T15:14:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2408f6ef6bf58620f8330b37181d2bdca2e7c7c5'/>
<id>urn:sha1:2408f6ef6bf58620f8330b37181d2bdca2e7c7c5</id>
<content type='text'>
Signed-off-by: Cong Wang &lt;amwang@redhat.com&gt;
</content>
</entry>
<entry>
<title>FUSE: Notifying the kernel of deletion.</title>
<updated>2011-12-13T10:58:49Z</updated>
<author>
<name>John Muir</name>
<email>john@jmuir.com</email>
</author>
<published>2011-12-06T20:50:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=451d0f599934fd97faf54a5d7954b518e66192cb'/>
<id>urn:sha1:451d0f599934fd97faf54a5d7954b518e66192cb</id>
<content type='text'>
Allows a FUSE file-system to tell the kernel when a file or directory is
deleted. If the specified dentry has the specified inode number, the kernel will
unhash it.

The current 'fuse_notify_inval_entry' does not cause the kernel to clean up
directories that are in use properly, and as a result the users of those
directories see incorrect semantics from the file-system. The error condition
seen when 'fuse_notify_inval_entry' is used to notify of a deleted directory is
avoided when 'fuse_notify_delete' is used instead.

The following scenario demonstrates the difference:
1. User A chdirs into 'testdir' and starts reading 'testfile'.
2. User B rm -rf 'testdir'.
3. User B creates 'testdir'.
4. User C chdirs into 'testdir'.

If you run the above within the same machine on any file-system (including fuse
file-systems), there is no problem: user C is able to chdir into the new
testdir. The old testdir is removed from the dentry tree, but still open by user
A.

If operations 2 and 3 are performed via the network such that the fuse
file-system uses one of the notify functions to tell the kernel that the nodes
are gone, then the following error occurs for user C while user A holds the
original directory open:

muirj@empacher:~&gt; ls /test/testdir
ls: cannot access /test/testdir: No such file or directory

The issue here is that the kernel still has a dentry for testdir, and so it is
requesting the attributes for the old directory, while the file-system is
responding that the directory no longer exists.

If on the other hand, if the file-system can notify the kernel that the
directory is deleted using the new 'fuse_notify_delete' function, then the above
ls will find the new directory as expected.

Signed-off-by: John Muir &lt;john@jmuir.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
<entry>
<title>fuse: fix fuse_retrieve</title>
<updated>2011-12-13T09:36:59Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2011-12-13T09:36:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=48706d0a91583d08c56e7ef2a7602d99c8d4133f'/>
<id>urn:sha1:48706d0a91583d08c56e7ef2a7602d99c8d4133f</id>
<content type='text'>
Fix two bugs in fuse_retrieve():

 - retrieving more than one page would yield repeated instances of the
   first page

 - if more than FUSE_MAX_PAGES_PER_REQ pages were requested than the
   request page array would overflow

fuse_retrieve() was added in 2.6.36 and these bugs had been there since the
beginning.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
CC: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>fuse: fix memory leak</title>
<updated>2011-09-12T18:47:10Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2011-09-12T07:38:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5dfcc87fd79dfb96ed155b524337dbd0da4f5993'/>
<id>urn:sha1:5dfcc87fd79dfb96ed155b524337dbd0da4f5993</id>
<content type='text'>
kmemleak is reporting that 32 bytes are being leaked by FUSE:

  unreferenced object 0xe373b270 (size 32):
  comm "fusermount", pid 1207, jiffies 4294707026 (age 2675.187s)
  hex dump (first 32 bytes):
    01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;b05517d7&gt;] kmemleak_alloc+0x27/0x50
    [&lt;b0196435&gt;] kmem_cache_alloc+0xc5/0x180
    [&lt;b02455be&gt;] fuse_alloc_forget+0x1e/0x20
    [&lt;b0245670&gt;] fuse_alloc_inode+0xb0/0xd0
    [&lt;b01b1a8c&gt;] alloc_inode+0x1c/0x80
    [&lt;b01b290f&gt;] iget5_locked+0x8f/0x1a0
    [&lt;b0246022&gt;] fuse_iget+0x72/0x1a0
    [&lt;b02461da&gt;] fuse_get_root_inode+0x8a/0x90
    [&lt;b02465cf&gt;] fuse_fill_super+0x3ef/0x590
    [&lt;b019e56f&gt;] mount_nodev+0x3f/0x90
    [&lt;b0244e95&gt;] fuse_mount+0x15/0x20
    [&lt;b019d1bc&gt;] mount_fs+0x1c/0xc0
    [&lt;b01b5811&gt;] vfs_kern_mount+0x41/0x90
    [&lt;b01b5af9&gt;] do_kern_mount+0x39/0xd0
    [&lt;b01b7585&gt;] do_mount+0x2e5/0x660
    [&lt;b01b7966&gt;] sys_mount+0x66/0xa0

This leak report is consistent and happens once per boot on
3.1.0-rc5-dirty.

This happens if a FORGET request is queued after the fuse device was
released.

Reported-by: Sitsofe Wheeler &lt;sitsofe@yahoo.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Tested-by: Sitsofe Wheeler &lt;sitsofe@yahoo.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fuse: check size of FUSE_NOTIFY_INVAL_ENTRY message</title>
<updated>2011-08-24T08:20:17Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2011-08-24T08:20:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c2183d1e9b3f313dd8ba2b1b0197c8d9fb86a7ae'/>
<id>urn:sha1:c2183d1e9b3f313dd8ba2b1b0197c8d9fb86a7ae</id>
<content type='text'>
FUSE_NOTIFY_INVAL_ENTRY didn't check the length of the write so the
message processing could overrun and result in a "kernel BUG at
fs/fuse/dev.c:629!"

Reported-by: Han-Wen Nienhuys &lt;hanwenn@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
CC: stable@kernel.org
</content>
</entry>
<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.amat.us/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.amat.us/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.amat.us/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.amat.us/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>
</feed>
