<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/overlayfs/readdir.c, branch v4.2</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>ovl: lookup whiteouts outside iterate_dir()</title>
<updated>2015-06-22T11:53:48+00:00</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2015-06-22T11:53:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=cdb672795876d7bc1870aed9a2d7cb59f43d1d96'/>
<id>cdb672795876d7bc1870aed9a2d7cb59f43d1d96</id>
<content type='text'>
If jffs2 can deadlock on overlayfs readdir because it takes the same lock
on -&gt;iterate() as in -&gt;lookup().

Fix by moving whiteout checking outside iterate_dir().  Optimized by
collecting potential whiteouts (DT_CHR) in a temporary list and if
non-empty iterating throug these and checking for a 0/0 chardev.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Fixes: 49c21e1cacd7 ("ovl: check whiteout while reading directory")
Reported-by: Roman Yeryomin &lt;leroi.lists@gmail.com&gt; 
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If jffs2 can deadlock on overlayfs readdir because it takes the same lock
on -&gt;iterate() as in -&gt;lookup().

Fix by moving whiteout checking outside iterate_dir().  Optimized by
collecting potential whiteouts (DT_CHR) in a temporary list and if
non-empty iterating throug these and checking for a 0/0 chardev.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Fixes: 49c21e1cacd7 ("ovl: check whiteout while reading directory")
Reported-by: Roman Yeryomin &lt;leroi.lists@gmail.com&gt; 
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'overlayfs-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs into for-next</title>
<updated>2015-02-20T09:58:52+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2015-02-20T09:58:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ce7b9facdf43b42fb95bdff9069aefeddb7d0a69'/>
<id>ce7b9facdf43b42fb95bdff9069aefeddb7d0a69</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ovl: discard independent cursor in readdir()</title>
<updated>2015-01-09T13:55:57+00:00</updated>
<author>
<name>hujianyang</name>
<email>hujianyang@huawei.com</email>
</author>
<published>2014-12-11T02:30:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4330397e4e8a662f36d101659e2a59ce32e76ff4'/>
<id>4330397e4e8a662f36d101659e2a59ce32e76ff4</id>
<content type='text'>
Since the ovl_dir_cache is stable during a directory reading, the cursor
of struct ovl_dir_file don't need to be an independent entry in the list
of a merged directory.

This patch changes *cursor* to a pointer which points to the entry in the
ovl_dir_cache. After this, we don't need to check *is_cursor* either.

Signed-off-by: hujianyang &lt;hujianyang@huawei.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since the ovl_dir_cache is stable during a directory reading, the cursor
of struct ovl_dir_file don't need to be an independent entry in the list
of a merged directory.

This patch changes *cursor* to a pointer which points to the entry in the
ovl_dir_cache. After this, we don't need to check *is_cursor* either.

Signed-off-by: hujianyang &lt;hujianyang@huawei.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ovl: check whiteout on lowest layer as well</title>
<updated>2014-12-12T23:59:45+00:00</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2014-12-12T23:59:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3e01cee3b980f96463cb6f378ab05303a99903d9'/>
<id>3e01cee3b980f96463cb6f378ab05303a99903d9</id>
<content type='text'>
Not checking whiteouts on lowest layer was an optimization (there's nothing
to white out there), but it could result in inconsitent behavior when a
layer previously used as upper/middle is later used as lowest. 

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Not checking whiteouts on lowest layer was an optimization (there's nothing
to white out there), but it could result in inconsitent behavior when a
layer previously used as upper/middle is later used as lowest. 

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ovl: multi-layer readdir</title>
<updated>2014-12-12T23:59:44+00:00</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2014-12-12T23:59:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9d7459d834c28f55c82f1737f638a6c90e0c0e0f'/>
<id>9d7459d834c28f55c82f1737f638a6c90e0c0e0f</id>
<content type='text'>
If multiple lower layers exist, merge them as well in readdir according to
the same rules as merging upper with lower.  I.e. take whiteouts and opaque
directories into account on all but the lowers layer.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If multiple lower layers exist, merge them as well in readdir according to
the same rules as merging upper with lower.  I.e. take whiteouts and opaque
directories into account on all but the lowers layer.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ovl: make path-type a bitmap</title>
<updated>2014-12-12T23:59:42+00:00</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2014-12-12T23:59:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1afaba1ecb5299cdd0f69b5bad98b0185fe71e79'/>
<id>1afaba1ecb5299cdd0f69b5bad98b0185fe71e79</id>
<content type='text'>
OVL_PATH_PURE_UPPER -&gt; __OVL_PATH_UPPER | __OVL_PATH_PURE
OVL_PATH_UPPER      -&gt; __OVL_PATH_UPPER
OVL_PATH_MERGE      -&gt; __OVL_PATH_UPPER | __OVL_PATH_MERGE
OVL_PATH_LOWER      -&gt; 0

Multiple R/O layers will allow __OVL_PATH_MERGE without __OVL_PATH_UPPER.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OVL_PATH_PURE_UPPER -&gt; __OVL_PATH_UPPER | __OVL_PATH_PURE
OVL_PATH_UPPER      -&gt; __OVL_PATH_UPPER
OVL_PATH_MERGE      -&gt; __OVL_PATH_UPPER | __OVL_PATH_MERGE
OVL_PATH_LOWER      -&gt; 0

Multiple R/O layers will allow __OVL_PATH_MERGE without __OVL_PATH_UPPER.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ovl: check whiteout while reading directory</title>
<updated>2014-12-12T23:59:42+00:00</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2014-12-12T23:59:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=49c21e1cacd74a8c83407c70ad860c994e606e25'/>
<id>49c21e1cacd74a8c83407c70ad860c994e606e25</id>
<content type='text'>
Don't make a separate pass for checking whiteouts, since we can do it while
reading the upper directory.

This will make it easier to handle multiple layers.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't make a separate pass for checking whiteouts, since we can do it while
reading the upper directory.

This will make it easier to handle multiple layers.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'iov_iter' into for-next</title>
<updated>2014-12-09T01:39:29+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2014-12-09T01:39:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ba00410b8131b23edfb0e09f8b6dd26c8eb621fb'/>
<id>ba00410b8131b23edfb0e09f8b6dd26c8eb621fb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ovl: ovl_dir_fsync() cleanup</title>
<updated>2014-11-20T15:40:02+00:00</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2014-11-20T15:40:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7676895f4736421ebafc48de5078e25ea69e88ee'/>
<id>7676895f4736421ebafc48de5078e25ea69e88ee</id>
<content type='text'>
Check against !OVL_PATH_LOWER instead of OVL_PATH_MERGE.  For a copied up
directory the two are currently equivalent.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Check against !OVL_PATH_LOWER instead of OVL_PATH_MERGE.  For a copied up
directory the two are currently equivalent.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ovl: pass dentry into ovl_dir_read_merged()</title>
<updated>2014-11-20T15:40:01+00:00</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2014-11-20T15:40:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c9f00fdb9ab3999cb2fb582ad82a5db9e70c82f5'/>
<id>c9f00fdb9ab3999cb2fb582ad82a5db9e70c82f5</id>
<content type='text'>
Pass dentry into ovl_dir_read_merged() insted of upperpath and lowerpath.
This cleans up callers and paves the way for multi-layer directory reads.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pass dentry into ovl_dir_read_merged() insted of upperpath and lowerpath.
This cleans up callers and paves the way for multi-layer directory reads.

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