<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/fuse, branch v3.13</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs/fuse?h=v3.13</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs/fuse?h=v3.13'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-11-13T06:34:18Z</updated>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2013-11-13T06:34:18Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-11-13T06:34:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9bc9ccd7db1c9f043f75380b5a5b94912046a60e'/>
<id>urn:sha1:9bc9ccd7db1c9f043f75380b5a5b94912046a60e</id>
<content type='text'>
Pull vfs updates from Al Viro:
 "All kinds of stuff this time around; some more notable parts:

   - RCU'd vfsmounts handling
   - new primitives for coredump handling
   - files_lock is gone
   - Bruce's delegations handling series
   - exportfs fixes

  plus misc stuff all over the place"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (101 commits)
  ecryptfs: -&gt;f_op is never NULL
  locks: break delegations on any attribute modification
  locks: break delegations on link
  locks: break delegations on rename
  locks: helper functions for delegation breaking
  locks: break delegations on unlink
  namei: minor vfs_unlink cleanup
  locks: implement delegations
  locks: introduce new FL_DELEG lock flag
  vfs: take i_mutex on renamed file
  vfs: rename I_MUTEX_QUOTA now that it's not used for quotas
  vfs: don't use PARENT/CHILD lock classes for non-directories
  vfs: pull ext4's double-i_mutex-locking into common code
  exportfs: fix quadratic behavior in filehandle lookup
  exportfs: better variable name
  exportfs: move most of reconnect_path to helper function
  exportfs: eliminate unused "noprogress" counter
  exportfs: stop retrying once we race with rename/remove
  exportfs: clear DISCONNECTED on all parents sooner
  exportfs: more detailed comment for path_reconnect
  ...
</content>
</entry>
<entry>
<title>fuse: writepages: protect secondary requests from fuse file release</title>
<updated>2013-11-05T09:11:29Z</updated>
<author>
<name>Maxim Patlasov</name>
<email>MPatlasov@parallels.com</email>
</author>
<published>2013-10-02T17:38:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ce128de6260f86a990ed44a697f26d0859684f28'/>
<id>urn:sha1:ce128de6260f86a990ed44a697f26d0859684f28</id>
<content type='text'>
All async fuse requests must be supplied with extra reference to a fuse
file.  This is necessary to ensure that the fuse file is not released until
all in-flight requests are completed.  Fuse secondary writeback requests
must obey this rule as well.

Signed-off-by: Maxim Patlasov &lt;MPatlasov@parallels.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
<entry>
<title>fuse: writepages: update bdi writeout when deleting secondary request</title>
<updated>2013-11-05T09:11:28Z</updated>
<author>
<name>Maxim Patlasov</name>
<email>MPatlasov@parallels.com</email>
</author>
<published>2013-10-02T17:38:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=41b6e41fc609753a9386d24295f7ed03b28c4601'/>
<id>urn:sha1:41b6e41fc609753a9386d24295f7ed03b28c4601</id>
<content type='text'>
BDI_WRITTEN counter is used to estimate bdi bandwidth.  It must be
incremented every time as bdi ends page writeback.  No matter whether it
was fulfilled by actual write or by discarding the request (e.g. due to
shrunk i_size).

Note that even before writepages patches, the case "Got truncated off
completely" was handled in fuse_send_writepage() by calling
fuse_writepage_finish() which updated BDI_WRITTEN unconditionally.

Signed-off-by: Maxim Patlasov &lt;MPatlasov@parallels.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
<entry>
<title>fuse: writepages: crop secondary requests</title>
<updated>2013-11-05T09:11:27Z</updated>
<author>
<name>Maxim Patlasov</name>
<email>MPatlasov@parallels.com</email>
</author>
<published>2013-10-02T17:38:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6eaf4782eb09e28dbd13d23b9ce0fb7646daf37e'/>
<id>urn:sha1:6eaf4782eb09e28dbd13d23b9ce0fb7646daf37e</id>
<content type='text'>
If writeback happens while fuse is in FUSE_NOWRITE condition, the request
will be queued but not processed immediately (see fuse_flush_writepages()).
Until FUSE_NOWRITE becomes relaxed, more writebacks can happen.  They will
be queued as "secondary" requests to that first ("primary") request.

Existing implementation crops only primary request.  This is not correct
because a subsequent extending write(2) may increase i_size and then
secondary requests won't be cropped properly.  The result would be stale
data written to the server to a file offset where zeros must be.

Similar problem may happen if secondary requests are attached to an
in-flight request that was already cropped.

The patch solves the issue by cropping all secondary requests in
fuse_writepage_end().  Thanks to Miklos for idea.

Signed-off-by: Maxim Patlasov &lt;MPatlasov@parallels.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
<entry>
<title>fuse: writepages: roll back changes if request not found</title>
<updated>2013-11-05T09:11:26Z</updated>
<author>
<name>Maxim Patlasov</name>
<email>MPatlasov@parallels.com</email>
</author>
<published>2013-10-02T11:01:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f6011081f5e290756bd90fe96f1e86d3eac76f77'/>
<id>urn:sha1:f6011081f5e290756bd90fe96f1e86d3eac76f77</id>
<content type='text'>
fuse_writepage_in_flight() returns false if it fails to find request with
given index in fi-&gt;writepages.  Then the caller proceeds with populating
data-&gt;orig_pages[] and incrementing req-&gt;num_pages.  Hence,
fuse_writepage_in_flight() must revert changes it made in request before
returning false.

Signed-off-by: Maxim Patlasov &lt;MPatlasov@parallels.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
<entry>
<title>fuse: rcu-delay freeing fuse_conn</title>
<updated>2013-10-25T03:45:13Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2013-10-04T01:21:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dd3e2c55a45fe75f3213b17b74f9a32380f4e84b'/>
<id>urn:sha1:dd3e2c55a45fe75f3213b17b74f9a32380f4e84b</id>
<content type='text'>
makes -&gt;permission() and -&gt;d_revalidate() safety in RCU mode independent
from vfsmount_lock.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>vfs: introduce d_instantiate_no_diralias()</title>
<updated>2013-10-25T03:41:37Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2013-10-01T14:44:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b70a80e7a133a0c86f2fa078e7c144597c516415'/>
<id>urn:sha1:b70a80e7a133a0c86f2fa078e7c144597c516415</id>
<content type='text'>
...which just returns -EBUSY if a directory alias would be created.

This is to be used by fuse mkdir to make sure that a buggy or malicious
userspace filesystem doesn't do anything nasty.  Previously fuse used a
private mutex for this purpose, which can now go away.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
<entry>
<title>cuse: add fix minor number to /dev/cuse</title>
<updated>2013-10-01T14:44:54Z</updated>
<author>
<name>Tom Gundersen</name>
<email>teg@jklm.no</email>
</author>
<published>2013-09-09T18:18:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cb2ffb26e67ef89c44f46e971440cda2f83ae236'/>
<id>urn:sha1:cb2ffb26e67ef89c44f46e971440cda2f83ae236</id>
<content type='text'>
This allows udev (or more recently systemd-tmpfiles) to create /dev/cuse on
boot, in the same way as /dev/fuse is currently created, and the corresponding
module to be loaded on first access.

The corresponding functionalty was introduced for fuse in commit 578454f.

Signed-off-by: Tom Gundersen &lt;teg@jklm.no&gt;
Cc: Kay Sievers &lt;kay@vrfy.org&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
<entry>
<title>fuse: writepage: skip already in flight</title>
<updated>2013-10-01T14:44:53Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2013-10-01T14:44:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ff17be0864777fe0dfb0a477868a8cb95c1ff90e'/>
<id>urn:sha1:ff17be0864777fe0dfb0a477868a8cb95c1ff90e</id>
<content type='text'>
If -&gt;writepage() tries to write back a page whose copy is still in flight,
then just skip by calling redirty_page_for_writepage().

This is OK, since now -&gt;writepage() should never be called for data
integrity sync.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
<entry>
<title>fuse: writepages: handle same page rewrites</title>
<updated>2013-10-01T14:44:53Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2013-10-01T14:44:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8b284dc47291daf72fe300e1138a2e7ed56f38ab'/>
<id>urn:sha1:8b284dc47291daf72fe300e1138a2e7ed56f38ab</id>
<content type='text'>
As Maxim Patlasov pointed out, it's possible to get a dirty page while it's
copy is still under writeback, despite fuse_page_mkwrite() doing its thing
(direct IO).

This could result in two concurrent write request for the same offset, with
data corruption if they get mixed up.

To prevent this, fuse needs to check and delay such writes.  This
implementation does this by:

 1. check if page is still under writeout, if so create a new, single page
    secondary request for it

 2. chain this secondary request onto the in-flight request

 2/a. if a seconday request for the same offset was already chained to the
    in-flight request, then just copy the contents of the page and discard
    the new secondary request.  This makes sure that for each page will
    have at most two requests associated with it

 3. when the in-flight request finished, send off all secondary requests
    chained onto it

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
</feed>
